• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
mysterious memory leak in cocoa ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: mysterious memory leak in cocoa ? (FOLLOWUP)
      • From: Nicolas Berloquin <email@hidden>
  • Prev by Date: Re: NSTableView with large arrays
  • Next by Date: Re: Problems parsing plist files
  • Previous by thread: Re: NSTableView with large arrays
  • Next by thread: Re: mysterious memory leak in cocoa ? (FOLLOWUP)
  • Index(es):
    • Date
    • Thread