-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLN_LoadSpriteset: Valgrind shows that memory is lost #53
Comments
Hi all @megamarc
The palette is never deleted. Fixed that I found another leak in the
Now, valgrind:
Regards. |
Hi Line 332 in ea888ae
It should be replaced by: destroySimpleXmlValueBuffer(parser->vbNextToken); This fixes the memory leak. New, Invalid read of size:
The problem is here: Line 101 in ea888ae
I think the size of
It would be equal to the previous calculation in: Line 73 in ea888ae
This fixes the invalid read size. There is another memory leak in
This conditional does not allow the cloned object to be released, at least I am thinking so. |
Hi guys! |
Tilengine uses a shallow object copy model. Only the initially created object owns references to their sibling objects. Cloned objects inherit the reference to the siblings from the original one, no siblings are cloned. That's why only objects created with |
The value of |
|
Memory leak in |
When testing my projects unit tests with valgrind for memory losses, I noticed that using TLN_LoadSpriteset resulted in bytes getting lost. I reproduced this behaviour with an example program, see below. I also added the Valgrind output I got below:
The text was updated successfully, but these errors were encountered: