init and dealloc
init and dealloc
- Subject: init and dealloc
- From: Lorenzo <email@hidden>
- Date: Thu, 29 Jan 2004 23:09:26 +0100
Hi,
I init a subclass of NSObject this way:
- (id)initWithData:(NSData*)theData sender:(id)sender
{
self = [super init];
if(!self) return nil;
if(![self check
Data:theData]) return nil;
owner = sender;
return self;
}
Now, if I return "nil" because of checkData returns NO,
what should I write to the dealloc method? This?
- (void)dealloc
{
[super dealloc];
}
Also, I use all the time the trick of the "sender" when I init some object,
so, from the object, I can call the creator of the object. Is this the
correct procedure or is there a better way to get the creator of the object?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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.