Re: Signal 11 and Signal 10 Errors
Re: Signal 11 and Signal 10 Errors
- Subject: Re: Signal 11 and Signal 10 Errors
- From: Buddy Kurz <email@hidden>
- Date: Fri, 19 Sep 2003 07:21:28 -0700
On Friday, September 19, 2003, at 04:55 AM, Emiliano Farinella wrote:
// Crea uno script Applescript e lo esegue
NSDictionary *errorInfo = [NSDictionary dictionary];
NSAppleEventDescriptor *descriptor = [script
executeAndReturnError:&errorInfo];
[errorInfo release];
[descriptor release];
This pattern is repeated in -(void)createNewCalendar and
-(void)manageToDo
errorInfo and descriptor were not created by [ [ alloc]init] and
therefore should not be released because they are already autoreleased.
I would suggest
// Crea uno script Applescript e lo esegue
NSDictionary *errorInfo ; //this is nil
NSAppleEventDescriptor *descriptor = [script
executeAndReturnError:&errorInfo];
if (errorInfo) {
do something with dictionary
}
// [errorInfo release]; since you didn't create the object
pointed to by errorInfo, don't release it
// [descriptor release]; descriptor is autoreleased
_______________________________________________
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.