public static KangarooGame getInstance() { if (instance == null) { lock (syncRoot) // Is used in order to not to be ambiguity // during execution of different threads... { if (instance == null) { instance = new KangarooGame(); } } } return(instance); }
public void setToNull() { instance = null; }