• 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
-[NSAppleEventDescriptor initWithAEDescNoCopy] memory management question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-[NSAppleEventDescriptor initWithAEDescNoCopy] memory management question


  • Subject: -[NSAppleEventDescriptor initWithAEDescNoCopy] memory management question
  • From: Jim Correia <email@hidden>
  • Date: Thu, 7 Apr 2005 18:09:12 -0400

The documentation says:

	initWithAEDescNoCopy:

	- (id)initWithAEDescNoCopy:(const AEDesc *)aeDesc

	Initializes and returns an NSAppleEventDescriptor that takes ownership
	of the Carbon AEDesc structure pointed to by aeDesc. Returns nil if an
	error occurs. The initialized object takes responsibility for calling
	the AEDisposeDesc function on the AEDesc at object deallocation time.
	This is the designated initializer for this class.

So it is clear that NSAppleEventDescriptor will call AEDisposeDesc on my behalf.

What about the storage for the AEDesc itself? Does it call free? Does it assume the storage will live longer than the object, and I am responsible?

Thanks,
Jim

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Problem: getting a DO's run loop to run while app is idle
      • From: John Clayton <email@hidden>
  • Prev by Date: Re: How to disable Spellcheck on NSTextView
  • Next by Date: Re: REST API & Cocoa Programming
  • Previous by thread: Re: How to disable Spellcheck on NSTextView
  • Next by thread: Problem: getting a DO's run loop to run while app is idle
  • Index(es):
    • Date
    • Thread