Unfreed in -diag

Posted By: 3run

Unfreed in -diag - 07/22/18 01:38

Hi guys!

I just noticed that in my project, when I run it with -diag command, I can see this at the end of the log
Quote:
Unfreed: 1286, , 52 bytes
Close window at 20.302
Does this mean that I'm having a memory related problem (unreleased memory)?
You may find this question stupid, but I'm worried about unfreed memory grin

Best regards!
Posted By: txesmi

Re: Unfreed in -diag - 07/22/18 07:52

Yes it is. There is a little memory unrealeased.

Salud!
Posted By: 3run

Re: Unfreed in -diag - 07/23/18 08:30

Thank you txesmi laugh
Posted By: txesmi

Re: Unfreed in -diag - 07/23/18 19:08

you are welcome.

You can use sys_marker before every memory allocation and know which one is.
Posted By: 3run

Re: Unfreed in -diag - 07/23/18 23:46

Didn't know that one.. Sounds very useable, thank you!

About unfreed memory - it's probably related to useage of 'parent' pointers (my guess), since I use them and on close they aren't removed probably. Got to make sure that I free/remove everything before closing the engine. I do that before loading new level or restarting the current one, so I just need to do that before exiting the game too.

Edit: nahh, I was wrong grin got to use 'sys_marker' and look for the leak.
© 2024 lite-C Forums