   Destructors are not getting called
  I put messagebox calls into some of my class destructors to see if they are actually called.Only 1 pops up. What would cause a destructor to not get called? 
  Memory leaks...class CObj {public:  CObj() { cout << "Constructor" << endl; }  ~CObj() { cout << "Destructor" << endl; }};void main() {  CObj* po = new CObj;} ;  I do delete the main class instance I create at the end of my WinMain and the other ones in my shutdown function.I figured my memory leaks were because of the destructors not getting called.. but if they aren't getting called because of a memory leak, Im stuck in finding it :/   [edited by - Maega on August 4, 2003 5:31:51 PM];  Perhaps your base destructor isn''t virtual?Memory leaks are only a problem if you don''t think about how your objects get passed around.Right after you write the new statement, write the corresponding delete statement when you''re done with the object. Memory leaks should be rare. ;  Post your code.   How appropriate. You fight like a cow. ;  It's quite large. Let me zip it and upload ithttp://vintagesoft.t35.com/code.zip [edited by - Maega on August 4, 2003 5:45:53 PM];  Focus on one object whose destructor you suspect is not being called and use the debugger to ensure that it is not being called...once you figure out if it is or not, then you should be able to isolate why it''s not being destroyed properly. ;  I fixed the problem.. but I still got memory leaks *sigh*   [edited by - Maega on August 4, 2003 6:04:46 PM]