Re: mysterious memory leak in cocoa ? (FOLLOWUP)
Re: mysterious memory leak in cocoa ? (FOLLOWUP)
- Subject: Re: mysterious memory leak in cocoa ? (FOLLOWUP)
- From: Nicolas Berloquin <email@hidden>
- Date: Wed, 9 Nov 2005 15:43:17 +0100
Hello !
In case anyone is interested, or observes the same thing in their
apps, I've come to the conclusion that
one shouldn't worry about those leaks.
After letting my app run for a few hours, I've noticed that,
alternatively, the leaks were either gone, or
different.
It appears that it's only some cocoa cache that comes and goes (and
never grows out of proportion).
case closed (for now).
On 8 nov. 05, at 13:04, Nicolas Berloquin wrote:
Hello !
I've been tracing the following memory leak in my app, and I can't
relate it to any of my (direct) doing :
Leak: 0x0198ec00 size=1024 string '?'
Call stack: [thread 810b]: | 0xbffffb8c | start | _start |
main | NSApplicationMain | -[NSApplication run] | -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] | _DPSNextEvent |
BlockUntilNextEventMatchingListInMode | ReceiveNextEventCommon |
RunCurrentEventLoopInMode | CFRunLoopRunSpecific | __CFRunLoopRun |
__CFRunLoopDoObservers | _handleWindowNeedsDisplay | -[NSWindow
displayIfNeeded] | -[NSView displayIfNeeded] | -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] |
-[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:] | -[NSView _drawRect:clip:] | -[NSTableView
drawRect:] | -[NSTableView drawGridInClipRect:] |
NSRectFillListUsingOperation | CGContextFillRects |
__CGContextDrawRects | ripc_DrawRects | ripc_Render | ripr_Coverage
I get many of those, growing slowly over time.
The only thing I can think of, that would be related to this is
when I update one tableView datasource.
What I do is call setNeedsDisplayInRect: for the corresponding cell
(instead of reloadData) :
NSRect updateRect = [tableView frameOfCellAtColumn:[tableView
columnWithIdentifier: curValueKey] row:[[curPeerValuesDico
objectForKey:@"row"] intValue]];
if (!NSEqualRects(updateRect, NSZeroRect)) {
[tableView setNeedsDisplayInRect:updateRect];
}
should I worry about that leak, or is it normal internal appkit
caching of something that won't grow overboard ?
thanks
PS I had 10 leaks like the one above when I started writiing, and
now I have 43 !
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden