About Store Forum Documentation Contact



Post Reply 
600+ memory leak(s)
Author Message
Valif Offline
Member

Post: #1
600+ memory leak(s)
Hi,

I have been using esenthel for a while and starting to wrap up this project. Then stumbled upon a flag:"APP_MEM_LEAKS". This flag made my day BAD when I saw i had 600+ memory leak(s) upon closing the app. The project got pretty big, but not that big that it could cause 600 memory leaks.
While idling in the game, the memory doesn't raise automatically or when I delete the whole world and reload it the memory raises with around 8kb.

Someone experienced this many memory leaks or knows what is causing it?

Thanks in advance,

-Valif
06-13-2012 08:57 PM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #2
RE: 600+ memory leak(s)
It could be that you're not properly clearing your memory on application exit.
It's not a very clean way to do things, but those actually don't matter at all (since windows will re-assign the memory anyway). However, these also count as memory leaks to visual studio.

Other than that, I haven't noticed any memory leaks in the engine. Then again, I also haven't paid attention to them.
06-13-2012 09:35 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: 600+ memory leak(s)
you can always have only 1 error, which is called 600 times wink so no reason to panic
are you on Windows or Mac?
06-13-2012 09:38 PM
Find all posts by this user Quote this message in a reply
Valif Offline
Member

Post: #4
RE: 600+ memory leak(s)
I'm running on a Windows
06-13-2012 09:41 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: 600+ memory leak(s)
easiest way to get memory leaks is to not call
free/Free for malloc/Alloc
or delete for new
or delete[] for new[]

engine memory containers Memc,Mems,etc. are memory leak proof

best way is to comment out half of your code and do, as I like to call it - " Binary Bug Hunt ™ "
06-13-2012 10:37 PM
Find all posts by this user Quote this message in a reply
Valif Offline
Member

Post: #6
RE: 600+ memory leak(s)
Hehe, I'll try your " Binary Bug Hunt ™ " ;p
06-13-2012 11:00 PM
Find all posts by this user Quote this message in a reply
Valif Offline
Member

Post: #7
RE: 600+ memory leak(s)
Ok, found the source of the problem of the memory leaks. It was caused because i forgot to destruct Raknet

Thanks for helping!
06-14-2012 02:43 AM
Find all posts by this user Quote this message in a reply
Post Reply