• 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
[NSStringDrawingTextStorage textContainerForAttributedString:] leaking?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NSStringDrawingTextStorage textContainerForAttributedString:] leaking?


  • Subject: [NSStringDrawingTextStorage textContainerForAttributedString:] leaking?
  • From: Matt Gough <email@hidden>
  • Date: Mon, 19 Jul 2004 09:27:39 +0100

Using ObjectAlloc, I have managed to track down a bunch of leaks in my app. However, I seem unable to do anything about a small leak that occurs whenever something results in [NSStringDrawingTextStorage textContainerForAttributedString:] being called.
E.d [NSAttributedString size].

The call chain goes:

-[NSAttributedString size]
-[NSAttributedString(NSStringDrawingExtension) _sizeWithSize:]
-[NSStringDrawingTextStorage textContainerForAttributedString:]
-[NSAttributedString copyWithZone:]
NSAllocateObject
_internal_class_createInstanceFromZone
malloc_zone_calloc


I have verified that my attributed string is getting released.

This also happens with fairly standard stuff in Cocoa itself:

e.g [NSCell cellSize] results in the same leak stemming from [NSStringDrawingTextStorage textContainerForAttributedString:]


The leak seems to be 16 bytes each time, so is not disastrous: it just gets in the way of finding my own leaks.

FYI - This is on Mac OS X 10.3.4 - not tested on anything else

Matt Gough
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: [NSStringDrawingTextStorage textContainerForAttributedString:] leaking?
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: cocoa app from scratch
  • Next by Date: Re: cocoa app from scratch
  • Previous by thread: NSTextField changing first responder on return key not working
  • Next by thread: Re: [NSStringDrawingTextStorage textContainerForAttributedString:] leaking?
  • Index(es):
    • Date
    • Thread