Re: NSButtonCell image leaking? [SOLVED]
Re: NSButtonCell image leaking? [SOLVED]
- Subject: Re: NSButtonCell image leaking? [SOLVED]
- From: "Giovanni Donelli" <email@hidden>
- Date: Tue, 4 Sep 2007 23:58:15 +0200
The leak I was having seem to be a false positive from "leaks". Also the
fact that the memory was constantly growing (as I was observing it from top)
was due to the fact that I had MallocStackLogging=1 which probably adds a
memory overhead to keep track of memory usage.
thanks you all,
Giovanni
On 9/4/07, Giovanni Donelli <email@hidden> wrote:
>
> Dear All,
> I am working on app with a bunch of NSButtons on a transparent window.
> NSButtons have different size and all contain an image that is changed
> frequently. These images are icons of a set of files ([[NSWorkspace
> sharedWorkspace] iconForFile:aPath]), all images once loaded are cached.
>
> Now the memory use of my app constantly rise as the images change. (I see
> that in top).
>
>
> If I run leaks on it, I see 4 or 5 leaks (not as many as I expected)
> regarding, I think NSButtonCell drawing sub-routines.
>
>
> Any idea what's happening and how to prevent this leak?
>
>
> Thanks!
> Giovanni
>
>
>
> Leak: 0x018ac400 size=4608
> 0xa8c28caa 0x45f9e0d0 0x77190954 0x8769a13d .......ET..w=.i.
> 0x21e7d498 0xac2f6f54 0xc75fbfac 0xac599981 ...!To/..._...Y.
> 0x391d337a 0x455fc33e 0xfa9ba0a5 0x5f07378c z3.9>._E.....7._
> 0xcf99443b 0xd1a8696f 0x065580bb 0x5ad78b6a ;D..oi....U.j..Z
> 0x00b4312d 0x87ca7cdc 0x714bcae4 0xd001941d -1...|....Kq....
> 0x2d78b73f 0x26cdbd14 0xcd56fe46 0xbbe57102 ?.x-...&F.V..q..
> 0x40537460 0x8fbe5557 0xb8898a02 0x47397471 `email@hidden
> 0xa5653de5 0x2c10b686 0x19cf9a84 0x0a061fee .=e....,........
> ...
> [STACK TRACE CUT]
>
>
> | -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRec
> tForView:]
> | -[NSNextStepFrame _recursiveDisplayRectIfNeededIg
> noringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
> | -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect
> :rectIsVisibleRectForView:topView:]
> | -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
> | -[NSView _drawRect:clip:]
> | -[NSView _regionForOpaqueDescendants:forMove:]
> | -[NSView _regionForOpaqueDescendants:forMove:]
> | -[NSButtonCell isOpaque]
> | -[NSButtonCell(NSButtonCellPrivate) _imagesHaveAlpha]
> | -[NSImage _asIconHasAlpha]
> | -[NSImage _expand]
> | -[NSImage _expandRep:]
> | PlotIconRefInCGContext
> | PlotIconRefInContext
> | PlotISImageRefInContext(void*, CGContext*, CGRect, short, short,
> RGBColor const*, unsigned long, _ISImageRefCallbacks const*)
> | ISGetCGImageRefForISImageRef(void*, CGSize, short, RGBColor const*,
> unsigned long, _ISImageRefCallbacks const*, CGRect*)
> | ISImageRefIterator(void*, unsigned char, short (*)(void*, void*), void*)
> | _ISGoThruImageStorages
> | MergeBestStorageIntoContext(void*, void*)
> | CreateCGImageRefFromBitmapInfo(_ISBitmapImageInfo*, unsigned char)
> | _cg_JP2SimpleDecompress | _cg_JP2SimpleDecompressAlloc |
> _cg_JP2DecompressBand
> | kd_synthesis::pull(kdu_line_buf&, bool) | kd_synthesis::horizontal
> _synthesis(kd_line_cosets&)
> | kd_synthesis::pull(kdu_line_buf&, bool) | kd_synthesis::horizontal_synthesis(kd_line_cosets&)
>
> | kd_synthesis::pull(kdu_line_buf&, bool) | kd_synthesis::horizontal
> _synthesis(kd_line_cosets&)
> | kd_synthesis::pull(kdu_line_buf&, bool) | kd_synthesis::horizontal_synthesis(kd_line_cosets&)
>
> | kd_synthesis::pull(kdu_line_buf&, bool) | kd_synthesis::horizontal
> _synthesis(kd_line_cosets&)
> | kd_decoder::pull(kdu_line_buf&, bool) | kd_decoder::decode_row_of
> _blocks()
> | kdu_subband::open_block(kdu_coords, int*) | kd_block::retrieve_data(kdu_block*,
> int)
> | kdu_block::set_max_bytes(int, bool)
> | operator new[](unsigned long) | operator new(unsigned long) | malloc
>
>
>
_______________________________________________
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