Re: First responder crashes in drawRect after processing keyDown
Re: First responder crashes in drawRect after processing keyDown
- Subject: Re: First responder crashes in drawRect after processing keyDown
- From: "Joshua Pennington" <email@hidden>
- Date: Tue, 5 Jun 2007 21:10:12 -0500
dictionaryWithObject:forKey: returns an autoreleased object and
_attributes is being released before you're done with it.
You need to read the memory management documentation:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_5.html>
<http://www.stepwise.com/Articles/Technical/MemoryManagement.html>
On 6/5/07, Tron Thomas <email@hidden> wrote:
- (void)awakeFromNib
{
NSFont* font = [NSFont userFontOfSize:64.0f];
_attributes =
[NSDictionary dictionaryWithObject:font
forKey:NSFontAttributeName];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden