Skip to content
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 problem #132

Open
wangjwchn opened this issue Feb 24, 2016 · 6 comments
Open

Memory leak problem #132

wangjwchn opened this issue Feb 24, 2016 · 6 comments

Comments

@wangjwchn
Copy link

Hi,
Recently, I used FLAnimatedImage as a benchmark for my animate GIF engine in swift "JWAnimatedImage".But when I used it by writing this in the ViewController:
NSURL *url = [[NSBundle mainBundle] URLForResource:@"test" withExtension:@"gif"];
NSData *data = [NSData dataWithContentsOfURL:url];
FLAnimatedImage *image =[FLAnimatedImage animatedImageWithGIFData:data];
FLAnimatedImageView *imageView = [[FLAnimatedImageView alloc] init];
imageView.animatedImage = image;
imageView.frame = CGRectMake(0.0,50.0,400.0,224.0);
[self.view addSubview:imageView];
When I run the program,the memory usage has been rising, increased from 6.6M to 14.7M in 2 minutes.You can see the Measurement at here.(https://github.com/wangjwchn/JWAnimatedImage)

@joelsteinbaugh
Copy link

I noticed this issue as well, the memory rises indefinitely in Xcode. Are there plans to address the memory leak and/or caching problem?

Thanks!

@caughtinflux
Copy link
Contributor

What gif are you using to test this out? test.gif?

@joelsteinbaugh
Copy link

I'm using NSData coming from a server

@kean
Copy link
Contributor

kean commented Mar 3, 2016

The only thing that grows in Allocations Instrument is Instruments related data from libBacktraceRecording.dylib (assuming you are using FLAnimatedImage demo).

screen shot 2016-03-04 at 01 03 17

The reason it "leaks" (not really, it just stores recordings into app's memory) is because FLAnimatedImage has Queue Debugging enabled:

screen shot 2016-03-04 at 01 04 15

Queue Debugging is enabled by default, make sure to disable it in your own projects. I haven't seen any leaks in my own projects, which have Queue Debugging disabled.

@antrix1989
Copy link

antrix1989 commented Oct 13, 2016

I noticed memory leaking for the following gif
75b6119f-4a3e-41ec-817a-091001b10acb

@raphaelschaad
Copy link
Collaborator

The only hints I could find were in #177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants