Re: Newbie with stupid question cont.
Re: Newbie with stupid question cont.
- Subject: Re: Newbie with stupid question cont.
- From: deekpyro <email@hidden>
- Date: Tue, 19 Mar 2002 21:39:25 -0600
I don't have any code yet in my app, so that's not it.
on 3/18/02 10:42 PM, Manuel Darveau at email@hidden wrote:
>
> I've tried what you guys just told me but when I build and run the app it
>
> unexpectedly quits. (it's a system preference pane) What up?
>
>
Try to remove (comment) any [bla release] or autorelease from your code and
>
try it again.
>
>
If you try to release an object that you dont initialized, you will get a
>
crash.
>
>
>
BTW, little question. If I do:
>
NSString *bla = [aString substringFromIndex:5];
>
>
Do I need to send a release to bla?
>
I'm asking because the following code crash if I uncomment the [sReturn
>
release]:
>
>
- (NSArray *) getInterfaceIPList{
>
NSArray *ifaces;
>
NSMutableArray *arrReturn;
>
NSString *sReturn;
>
int x;
>
>
ifaces = [self getInterfaceList];
>
arrReturn = [NSMutableArray arrayWithCapacity:[ifaces count]];
>
for(x=0 ; x < [ifaces count]; x++){
>
sReturn = [NSString stringWithFormat:@"%@ (%@)", [ifaces
>
objectAtIndex:x], [self getIPForInterface:[ifaces objectAtIndex:x]]];
>
[arrReturn addObject:sReturn];
>
[sReturn release]
>
}
>
return arrReturn;
>
}
>
>
Manuel Darveau
>
_______________________________________________
>
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.
_______________________________________________
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.