• 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: Invoking command line commands with environment variables set
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invoking command line commands with environment variables set


  • Subject: Re: Invoking command line commands with environment variables set
  • From: James Quick <email@hidden>
  • Date: Tue, 5 Aug 2003 20:37:19 -0400

On Tuesday, August 5, 2003, at 10:40 AM, Shawn Erickson wrote:

On Tuesday, August 5, 2003, at 07:09 AM, Andreas Monitzer wrote:

On Tuesday, Aug 5, 2003, at 15:56 Europe/Vienna, James Quick wrote:

On Tuesday, August 5, 2003, at 04:54 AM, Terje Tjervaag wrote:

newtask = [[[NSTask alloc] init] retain];

Also why the retain above?

Things that are alloc-ed have a retain count of 1 already otherwise they wouldn't live long enough to get a retain message... did you mean to do autorelease?

(I have seen the above alloc/init/retain in a lot of code on this list lately, did someone publish a doc with this strange pattern?)

NSMutableDictionary *env =[NSMutableDictionary [newTask environment];

I think that should be

NSMutableDictionary *env=[[newTask environment] mutableCopy];

Sorry for the lazy code in email.
I've been reading a lot of examples of alloc/init/retain too.
That pattern seems stuck in my brain, like bad song.

Thanks for the corrections, both of you
_______________________________________________
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: 
 >Re: Invoking command line commands with environment variables set (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: Dealing with Mac/Unix/Windows line breaks
  • Next by Date: persistent graphic (NSBezierPath) objects
  • Previous by thread: Re: Invoking command line commands with environment variables set
  • Next by thread: iSync SDK?
  • Index(es):
    • Date
    • Thread