Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public void setToNull()
 {
     instance = null;
 }