mysterious memory leak in cocoa ?
mysterious memory leak in cocoa ?
- Subject: mysterious memory leak in cocoa ?
- From: Nicolas Berloquin <email@hidden>
- Date: Tue, 8 Nov 2005 13:04:44 +0100
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:rectIsVisible
RectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible
RectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible
RectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible
RectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible
RectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible
RectForView:topView:] | -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisible
RectForView: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