Quick question
When is a destructor called ?
Code:ThreadManager::~ThreadManager() { CloseHandle(m_hThread); };
Let's say this was in my code ?
Is the destructor called if this object goes out of scope ?
Example
void foo()
{
ThreadManager t ;
};
Is the destructor called when the scope has ended ?
Is there a way to call the destructor explicitly ?
Is it just as simple as delete t;
Thanks
Stev




Reply With Quote