• Advertisement

Archived

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

Error - HELP! Anyone know...

This topic is 5910 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

Hi, I am using a test implementation of my game engine. Everything was working fine until I added a test of my particle system. It uses dynamic memory allocation. eg: type *var; var = new type; delete[] type; When the program starts, I allocate the memory, when it ends, I de-allocate it. When the program ends, I get an unhandled exeption error. Anyone have an idea why? I think it has to do with releasing the memory, but I can''t seem to resolve it. Thank you to all who reply. Alex Broadwin A-Tronic Software & Design ----- "if you fail in life, you were destined to fail. If you suceed in life, call me." "The answer is out there." "Please help, I''m using Windows!"

Share this post


Link to post
Share on other sites
Advertisement
  
// Use either


var = new X;
delete var;

// OR


var = new X[10];
delete[] var;

Share this post


Link to post
Share on other sites
Aha, thnx. I did know that, but missed one burried deconstructer with the wrong one. Thanks a ton!

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"

Share this post


Link to post
Share on other sites

  • Advertisement