Hi All,
if below code valid ? All sample codes I could find invoke "self = [super
init]" first and then check the input parameter inside "if (self)" block.
@implementaion Bla
- (id)initWithFoo:(NSString *)foo
{
if (foo == nil) {
return nil;
}
self = [super init];
if (self) {
_foo = foo;
.....
}
return self;
}
I had thought there would be memory leak. "Bla * b = [Bla alloc ]
initWithFoo:nil];" . However under ARC using Instruments Leaks, there are no
leak found.
Thanks in advance!
Bob Cromwell
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]