Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Leak #15

matsumoto79 opened this Issue · 3 comments

3 participants


Hi Brow, thanks for sharing your projects .

I tested your project in a real device (Iphone4) with 12 more images in the Image Example mode and I think uncache you are doing is not sufficient, the images are kept in memory in another step. If you run Instruments/Allocations you can see how the liveBytes grow until you have gone throw all the images. You can see some info about this object's allocation, like Responsible Library = ImageIO or Responsible Caller = ImageIO_Malloc. However I cant fix it so far ... your help would be really appreciate it.




I am seeing the same problem too. When zooming in and out several times and flipping pages causes a huge memory leak or huge allocations. I've tried running Instruments and cannot pinpoint where the leak is taking place... Anyone else have any thoughts or ideas? BTW I'm using Hammerlyrodrigo's most recent version with zooming enabled.


matsumoto79, I had received a solution (test it and verify for yourself!) to fix the memory problem I was having from Rodrigo Hammerly, assuming you are using his version (September 2011). For me it worked for the most part, I just had to tweak some of the tile settings. I changed the level of detail down to 4 and the bias to 2, and it seemed to work fine. The only time it didn't work was I had a higher detail and bias, which I think just took up too much memory to cache.

Add these two lines of code to -(void)getImages in the LeavesView.m file.
topPageZoomLayer.contents = nil;
topLeftPageZoomLayer.contents = nil;


@matsumoto79 I'm not able to reproduce the memory profile you're describing. If anyone can reproduce, please reopen this issue and publish your modified example in a fork.

@brow brow closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.