Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

sirSolarius

Deconstructor not firing...

This topic is 5371 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yes, I think the AP is right - if the compiler has a forward declaration of a class but not the whole definition and you try to delete a pointer to that class, it doesn't call the destructor. I tried a quick example of this and fortunately, MSVC gave me a warning about this, warning C4150. Make sure that MemoryManager.cpp includes MemObj.h into it so that it knows about MemObj's destructor.

[Edit] Oh yeah, and make sure to keep your warning level high. I got this warning on levels 2 and above, but not on level 1 (and obviously not on the None setting either). You wouldn't have had to bang your head on the wall for days waiting for the above AP's brilliance if you'd just had your warning level high enough. [/Edit]

[edited by - aprosenf on June 9, 2004 12:43:44 PM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!