• 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: Compiling AppleScript in Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling AppleScript in Cocoa?


  • Subject: Re: Compiling AppleScript in Cocoa?
  • From: Cameron Hayne <email@hidden>
  • Date: Thu, 16 Oct 2003 00:19:25 -0400

On 15/10/03 6:18 PM, "Keo Darksbane" <email@hidden> wrote:

> NSDictionary *errs = [[NSDictionary alloc] init];
> NSAppleScript *launcher = [[NSAppleScript alloc]
> initWithSource: @"current date"];
> [launcher compileAndReturnError:&errs];

This isn't an answer to your question about an error message from
'compileAndReturnError' but instead is a heads-up about what seems to be a
memory leak in the above code.
It seems to me that you shouldn't be alloc & init-ing that NSDictionary. I
think the compileAndReturnError will initialize the pointer whose address
you pass it (&errs) to point to an auto-released NSDictionary object. Hence
the NSDictionary object that you have alloc'd has been lost track of and so
you have a memory leak.

--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
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: 
 >Compiling AppleScript in Cocoa? (From: Keo Darksbane <email@hidden>)

  • Prev by Date: Re: Sheets overstaying their welcome
  • Next by Date: Re: Sheets overstaying their welcome
  • Previous by thread: Compiling AppleScript in Cocoa?
  • Next by thread: General weirdness with [self window]
  • Index(es):
    • Date
    • Thread