Re: crash when using notification center and self
Re: crash when using notification center and self
- Subject: Re: crash when using notification center and self
- From: Cameron Hayne <email@hidden>
- Date: Tue, 6 Jun 2006 05:38:51 -0400
On 6-Jun-06, at 2:01 AM, Tyler Riddle wrote:
[[NSNotificationCenter defaultCenter]
postNotificationName:@"MBModelStateChanged" object:self
userInfo:info];
results in a SIGSEGV
You mean you get a SEGV on that line?
Or that you get a SEGV somewhere else (e.g. when the notification is
received)?
Are you sure that the object pointed to by 'self' is still around
when the notification is received?
Are you retaining that object? (Misunderstanding how Cocoa handles
memory is by far the most common problem for beginners.)
Perhaps Apple's doc on debugging will help:
http://developer.apple.com/technotes/tn2004/tn2124.html
--
Cameron Hayne
email@hidden
_______________________________________________
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