Re: CIImage drawAtPoint: ...... retains image??
Re: CIImage drawAtPoint: ...... retains image??
- Subject: Re: CIImage drawAtPoint: ...... retains image??
- From: Nik Youdale <email@hidden>
- Date: Sat, 15 Dec 2007 23:05:29 +1100
Yeah its terribly frustrating. I've spent hours trying to debug
this..... :-(
After some more experimentation, ive found that the leak only occurs
when the image is actually visible on screen and being drawn. If you
try and draw the image in a view at a location where the image won't
be visible on screen - no leak. But as soon as the smallest corner of
the image is visible, my app starts leaking - depending on how far i
push it, 1.... 2GB...
I've tried calling the CIContext clearCaches, and reclaimResources,
but they appear to do nothing. I've tried releasing all my CImages
(relatively minor change in mem usage - nothing significant), manually
deallocing images (larger regain in memory, but then nothing works
anymore, of course).
I must admit that I'm not an expert on using malloc debug, or
instruments, but from what I can figure out the leak appears to be
somewhere in core image itself...... I did a bit of googling and
found: http://www.pcpro.co.uk/macuser/news/142938/pixelmator-uncovers-core-image-memory-leak.html
- Don't know where abouts that leak is.... but I have a feeling it
might be related? Anybody know?
- Nik
On 15/12/2007, at 10:44 PM, Andreas Monitzer wrote:
I'm seeing the same issue in my program. As soon as I try to render
the CIImage somehow (to my view or offscreen), the whole image
leaks. Since I'm drawing fullscreen images regularly, my application
leaks 60MB of RAM per cycle (verified using Instruments). The memory
is never freed in any way, it just builds up.
I haven't found a solution yet, even though I spent a whole day
trying different ways to get the pixels out of the CIImage (all of
them leaking). I'm thinking about scrapping CIImage altogether and
re-implementing all CoreImage filters I'm using using direct OpenGL
calls and some shaders. That's much more work, but at least I can
fix those leaks that way.
andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden