B
bob smith
If someone asks you to write a Singleton class in C++, can someone help me see what the answer would be?
In particular, I don't know if the getInstance() function ought to return Singleton* or Singleton&.
I'm also concerned about when and how the memory for this class will be deallocated.
Thanks.
In particular, I don't know if the getInstance() function ought to return Singleton* or Singleton&.
I'm also concerned about when and how the memory for this class will be deallocated.
Thanks.