• Advertisement
Sign in to follow this  

memory leak (tutorial 10)

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

In the tutorial 10 () after the instruction sector1.triangle = new TRIANGLE[numtriangles]; I would like to know when that dynamic memory is freed?

Share this post


Link to post
Share on other sites
Advertisement
so can i free that memory in order to avoid a memory leak? I have tried to free it before the return statement of the SetUpWorld function but it doesn't work any more

Share this post


Link to post
Share on other sites
You can't free the memory at the end of SetUpWorld because you still need the data elsewhere.
try to free the memory at the end of winMain.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement