Re: Best practice question
Re: Best practice question
- Subject: Re: Best practice question
- From: Boyd Collier <email@hidden>
- Date: Sun, 29 Oct 2006 12:12:12 -0800
The many postings on this subject got me looking at some code I wrote
a while back, and now I'm wondering whether it is potentially wrong.
Here's the code and a question (as a comment):
- (id)init:(int)vectorLength {
if (nil != (self = [super init])) {
int *theArray = (int*)malloc((size_t)(vectorLength*sizeof(int)));
if (theArray != NULL) {
// do stuff
}
else {
[super dealloc]; // should this be [super release] rather than
[super dealloc]?
return nil;
}
}
return self;
}
Thanks,
Boyd
_______________________________________________
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