FROM : Michael Vannorsdel
DATE : Sat Apr 26 23:52:31 2008
How do you know there's a leak and do you know what type of object is
being leaked? I don't see any obvious leaks in your code snippet. If
flip_v is done in a secondary thread and you're not creating an
autorelease pool and draining it, then you could have a leak. That's
my best guess without more info.
Also, I'm curious why you're copying m_image and tossing the
original. It seems to make more sense to autorelease m_image and use
it as the input, not using a copy. Same result with less time and
memory.
On Apr 26, 2008, at 2:32 PM, Jere Gmail wrote:
> I've an image loaded into memory and I want to flip it. The problem is
> that when I do it some memory is leaked. I've searched and sliced the
> code but can't find where it is. Maybe someone can help. The function
> I call is flip. If I call flip_v or needsDisplay only no leak
> happens, but when both are called there is something wrong.
DATE : Sat Apr 26 23:52:31 2008
How do you know there's a leak and do you know what type of object is
being leaked? I don't see any obvious leaks in your code snippet. If
flip_v is done in a secondary thread and you're not creating an
autorelease pool and draining it, then you could have a leak. That's
my best guess without more info.
Also, I'm curious why you're copying m_image and tossing the
original. It seems to make more sense to autorelease m_image and use
it as the input, not using a copy. Same result with less time and
memory.
On Apr 26, 2008, at 2:32 PM, Jere Gmail wrote:
> I've an image loaded into memory and I want to flip it. The problem is
> that when I do it some memory is leaked. I've searched and sliced the
> code but can't find where it is. Maybe someone can help. The function
> I call is flip. If I call flip_v or needsDisplay only no leak
> happens, but when both are called there is something wrong.
| Related mails | Author | Date |
|---|---|---|
| Jere Gmail | Apr 26, 22:32 | |
| Michael Vannorsdel | Apr 26, 23:52 | |
| Jere Gmail | Apr 27, 00:07 | |
| Jere Gmail | Apr 27, 00:14 |






Cocoa mail archive

