• 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
Re: NSFont leak verified in 10.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFont leak verified in 10.2


  • Subject: Re: NSFont leak verified in 10.2
  • From: Aki Inoue <email@hidden>
  • Date: Mon, 26 Aug 2002 14:31:37 -0700

Chuck,

In 10.2, we're instantiating separate NSFont instances when the fontname argument is not valid.
It causes the leak because of the way NSFont instances are cached.

In your case, there is no font named "Arial" in standard Mac OS X installation.
The argument is supposed to be the font's postscript name.
So, what you need here is "ArialMT" not "Arial"

Aki

On 2002.8.26, at 10:59 AM, Charles Bennett wrote:

NSFont *font = [NSFont fontWithName:@"Arial" size:12];

NSFont is 'supposed' to cache multiple requests for font objects that
have the same name and size per the NSFont docs..

I moved the same project back to 10.1.5
and as expected each call returns the same pointer..

Same code in 10.2 leaks like crazy.

Workaround: Better keep your own cache, or alloc them once at init..

Headed to bug reporter now..

Chuck

--
UPS Management software for OS X
http://www.powerguardian.com
_______________________________________________
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.
_______________________________________________
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: NSFont leak verified in 10.2
      • From: Charles Bennett <email@hidden>
References: 
 >NSFont leak verified in 10.2 (From: Charles Bennett <email@hidden>)

  • Prev by Date: Mouse entered and exited events
  • Next by Date: Can a menu title be colored?
  • Previous by thread: NSFont leak verified in 10.2
  • Next by thread: Re: NSFont leak verified in 10.2
  • Index(es):
    • Date
    • Thread