Re: NSFont leak verified in 10.2
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.