-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Memory leak on constructor error #38
Comments
Thanks, you are right, some memory cleanings are missing in case when opening fails. I will fix it ASAP. If you want to it yourself look at |
Ok, good to know I'm not going crazy. Tracking down that leak was tricky. I was already looking in Based on your advice I tried replacing
with
but that didn't work. I'd love to help out and submit a pull request if I can get it fixed, but unfortunately I'm struggling with C at the moment. |
Did you recompile native sources properly? |
No, I didn't! I haven't worked with jni before and wasn't aware I had to recompile it manually. Anyway, I recompiled and now it seems to be working, thanks! |
Fixed for all affected sources. |
When I try to create a
new GifDrawable(byte[])
and it fails because the file is not a gif, I am left with a dangling byte[] of the size of the image that can never be freed. Over time this leads to large memory problems.The problem seems to be somewhere in
openByteArray()
, but I haven't been able to track down the exact problem in the C code.I load lots of images that may or may not be gifs, and I was using this as an easy test to check if they are gifs. Unfortunately the memory leak is prohibitive. I'd love some input on where to look to fix this.
The text was updated successfully, but these errors were encountered: