-
Notifications
You must be signed in to change notification settings - Fork 272
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 problem on AnimatedImages #12
Comments
Bump... Are you guys aware of any memory leak issues? I am also facing memory issues when placing |
Bump. |
Interesting. I am personally not aware of any memory leaks but I wouldn't rule them out. To be able to debug this, we will need more information such as:
|
I have created a sample project which I believe demonstrates a memory leak: https://github.com/mr-seiler/gifu-bug-demo/tree/master Instructions are in the Readme file. The essential structure of application is simply a navigation controller with a button that pushes a second view controller onto the navigation stack; the second view controller contains a Gifu AnimatableImageView. When the pushed view controller is popped back off the stack and deallocated, it appears (based on analysis in Instruments) that the AnimatableImageView is not being released, and more memory is allocated each time the view controller is pushed/popped.
|
We have found a solution to prevent a reference cycle between CADisplayLink and the AnimatableImageView; I will have a PR open with the implementation shortly. I will also attach the Instruments trace to the PR. |
Hello,
I am currently using the pre-carthage Gifu and have been encountering some memory problem.
I have a few AnimatedImages in a dictionary and, whilst I try to clear them with dictionary.removeAll(), I can see that their deinit (which I have implemented) is never called.
I had a similar problem with an AVPlayer overload of mine and I know objects won't free themselves until they have no longer a single "dependency" (lack of a better term). So, I tried to remove delegate, pause them and remove displayLink from the mainRunLoop but still, it won't call deinit.
Since I'm a bit new in swift, I haven't manage to understand all of your syntax / code, and thus, I hope you can enlighten me on that.
Thank you for your time and for Gifu, it really helped me a lot on my current project.
Cordially, Louis.
The text was updated successfully, but these errors were encountered: