Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Sandy McGuffog via Cocoa-dev
Yet another possible issue is that Apple’s frameworks tend to like to hold onto and reuse objects like CALayers. As a result they also hold onto the contents for much longer than you might think. I would at least try imgLayer.contents = nil as soon as you’re sure the layer won’t be displayed

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Rob Petrovec via Cocoa-dev
> On May 1, 2023, at 5:04 AM, Gabriel Zachmann wrote: > > Thanks so much again! > > I tried, and it didn't give me a good clue, though. > What I got as output is: > All zones: 1466 nodes malloced - Sizes: 117040KB[25] 96KB[25] 8KB[2] 5.5KB[1] > 5KB[1] 4KB[2] 3KB[3] 2.5KB[2] 2KB[4] 1.5KB[4]

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Gabriel Zachmann via Cocoa-dev
Thanks so much again! I tried, and it didn't give me a good clue, though. What I got as output is: All zones: 1466 nodes malloced - Sizes: 117040KB[25] 96KB[25] 8KB[2] 5.5KB[1] 5KB[1] 4KB[2] 3KB[3] 2.5KB[2] 2KB[4] 1.5KB[4] 656[15] 592[2] 528[2] 512[2] 448[5] 400[3] 384[2] 368[3] 352[1] 336[1]

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Gabriel Zachmann via Cocoa-dev
Hm, on closer inspection, maybe it did help. At the moment, at least, the memory footprint of my app levels out at 3GB (which would be OK). In any case, thanks again so much to everybody who chimed in! Best regards, Gabriel > On 1. May 2023, at 12:43, Gabriel Zachmann wrote: > > Thanks a lot

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your response! I am not sure, though, I understand what you mean. I've got 3 autoreleasepool's in different places in my source code. They are just @autoreleasepool { ... do something ... } What do you mean by "insufficient use" ? and how do you mean "exit the nearest

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Gabriel Zachmann via Cocoa-dev
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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:

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Saagar Jha via Cocoa-dev
malloc is not the only way for your app to leak memory. CGImage in particular allocates its own anonymous VM regions. footprint against your process (man 1 footprint) is a good way to get a quick look at where the system thinks this memory is going. Once you’ve looked at that, Instruments or

Re: Memory leak in Apple's image handling frameworks ?

2023-05-01 Thread Alex Zavatone via Cocoa-dev
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: