As stated here.It doesn't give me line numbers or file names, I'm assuming because I'm using the stack, containers and smart pointers for all allocations.

One of the things I'm doing is storing particles in the emitter class during the spawn function, then I move them out using std::move() after I spawn them. I did this because you can move the emitter to a new location and spawn more particles before retrieving the whole vector. This allowed me to spawn new particles from the emitter and remove dead particles from the effect before collecting and adding them to the effects particle list. I'll have to try having a vector of vectors of particles in the effects class and see if that has any effect on the leaks or just create a destructor in the emitters that clears the vector of particles.

_________________If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

was because I use a unique_ptr for the static classes WicInitializer and DWriteInitializer and I believe static variables don't get released until program exit which would be after the call to _CrtDumpMemoryLeaks. Created a static void Release() function in each of the initializer classes and a handler class that will instantiate at the beginning before Game and destruct at the end of the try block.

_________________If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Joined: February 28th, 2013, 3:23 amPosts: 2844Location: Oklahoma, United States

K, found all the leaks. Chili lead me to looking to memory dumps and I luckily saw some familiar text. It lead me to look in the text class, then to the font class where I had some logging code which used a static member. Even though I use smart pointers, they won't get released until after the leak check.

Released the resources before the check and bam, no more leaks.

_________________If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

Joined: February 28th, 2013, 3:23 amPosts: 2844Location: Oklahoma, United States

Ok, fixed the broken stuff, here's the commit log:

Quote:

Added conical emitter classFixed the emittersAdded static void Release functions to the Loggers as well.Renamed InitHandler to StaticHandler and moved it to it's own file.Moved some comments around.Removed references to debug test code

The master branch has been updated to include these updates.

_________________If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum