Re: NSData object trouble with <16KB
Re: NSData object trouble with <16KB
- Subject: Re: NSData object trouble with <16KB
- From: Ondra Cada <email@hidden>
- Date: Fri, 23 Apr 2004 00:59:54 +0200
Michael,
On 23.4.2004, at 0:50, Michael Hall wrote:
>
It seems for Obj-C like init should _always_ be invoked and should
>
_always_ invoke supers
*Definitely*. If implemented, the designated initalizer should *always*
follow the pattern
-init { // or initWith...
if ((self=[super init])) { // or initWith..., the superclass'
designated initalizer
// initialization
}
return self;
}
or some equivalent one (possibly returning nil or a different object --
of this class or its subclass -- if need be).
All the other initalizers should just use the designated one:
-initWithWhatever... {
return [self initWithSomethingElse:...]; // initWithSomethingElse
this class' designated initalizer
}
Just to keep the picture complete, similarly, if implemented, dealloc
should *always* follow the pattern
-(void)dealloc {
// release whatever you need to, preferrably using setters setting to
nil
[super dealloc];
}
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.