Jump to content
  • Advertisement
Sign in to follow this  
franc82

memory leak (tutorial 10)

This topic is 4268 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
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!