Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: VS Memory Leak Trolls me?  (Read 2324 times)

0 Members and 1 Guest are viewing this topic.

Roose Bolton of the Dreadfort

  • Full Member
  • ***
  • Posts: 113
  • Full-time Procrastinator, Part-time programmer.
    • View Profile
    • Personal Portfolio/Website/Blog
VS Memory Leak Trolls me?
« on: October 21, 2012, 12:46:50 am »
So.

Spent the day putting together my small cute little Engine for my next game using some nice state manager kindly pointed to me by Exploiter.

All was going swimmingly then I noticed in the Visual Studio Debugger it was reporting memory leaks.

I tried to debug them but literally couldn't find them anywhere, it was so annoying.

I then decided to download http://vld.codeplex.com/

Installed this and hooked it into my project and it reports no leaks.. I then purposely comment out the line off code that cleans up my Graphics Model singleton and it reports leaks.. so the plugin works fine, so it must have been telling me the truth about no leaks..

Was VS Debugger trolling me? Can the build in CRT reporter fuck up like that?
Trying so very hard to finish at-least one project.

Watch out for the RAII police, they will get you.

www.bantersaurus-games.com

fredrick

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: VS Memory Leak Trolls me?
« Reply #1 on: October 21, 2012, 03:51:53 am »
Yes, especially since CRTDump is called before, in many cases before ~dstr is called on exit.

Better to use 3rd party solutions, one example which you may already have available is  the "Analyze" toolkit. It is OK if you have it available in VS (Non Express)

Acrobat

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Re: VS Memory Leak Trolls me?
« Reply #2 on: October 22, 2012, 02:45:07 pm »
Was VS Debugger trolling me? Can the build in CRT reporter fuck up like that?
Probably you are not using _CRTDBG_LEAK_CHECK_DF flag.