Re: _NSKeyValueObservationInfoCreateByRemoving crashing
Re: _NSKeyValueObservationInfoCreateByRemoving crashing
- Subject: Re: _NSKeyValueObservationInfoCreateByRemoving crashing
- From: Nicko van Someren <email@hidden>
- Date: Tue, 1 Nov 2005 17:10:53 +0000
On 1 Nov 2005, at 16:50, Stefan Fisk wrote:
So basically:
Works for now, but is stopping me from adding planned features.
- (Engine *)engine {
return [[engine retain] autorelease];
}
Also works for now, but is stopping me from adding planned features.
- (Engine *)engine {
id old = [engine autorelease];
engine = [engine copy];
return old;
}
Crashes instantly, but it's the right thing to do.
- (Engine *)engine {
return [[engine copy] autorelease];
}
So, what does the implementation of -copyWithZone: look like for the
class Engine? Your crashes seem to be related to using the copy;
have you checked that the copy you get back is what you are expecting?
You do know that NSObject doesn't implement the NSCopying protocol
and you have to do this yourself, don't you?
Nicko
_______________________________________________
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