On 12/29/2013 2:03 PM, Mike wrote:
x's destructor never gets called. What do I need to implement to have the destructor called when x goes out of scope?
Class destructors are not called when an object goes out of scope. They are called by the garbage collector only when memory needs to be reclaimed or during the cleanup cycle during app shutdown.