• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Signal 11 and Signal 10 Errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Signal 11 and Signal 10 Errors (From: Emiliano Farinella <email@hidden>)

  • Prev by Date: Re: mysql question
  • Next by Date: Re: Objective-C Question [long]
  • Previous by thread: Signal 11 and Signal 10 Errors
  • Next by thread: Re: mysql question
  • Index(es):
    • Date
    • Thread