• 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: Meaning of allocWithZone:NULL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Meaning of allocWithZone:NULL?


  • Subject: Re: Meaning of allocWithZone:NULL?
  • From: "David W. Halliday" <email@hidden>
  • Date: Wed, 20 Jun 2001 07:50:23 -0500
  • Organization: Latin AmeriCom, formerly Latino Online

Youngjin Kim wrote:

> Hi,
> I roughly understand that allocWithZone:[self zone] will use same memory
> area with caller object. but what's the meaning of 'allocWithZone:NULL'?
>
> The shared instance of SKTToolPaletteController in Sketch example uses
> allocWithZone:NULL, while that of SKToolInspectorController in the same
> example uses allocWithZone:[self zone] to create its instance. What's
> the difference between two?
>
> SKToolInspectorController implements dealloc method, but is never
> actually called. In my understanding, shared instance of both objects
> need to be released explicitly. Shouldn't SKTDrawAppDelegate need to
> implement applicationWillTerminate method to release memory allocated by
> both?
>
> Youngjin

I believe you'll find that +allocWithZone:NULL is the same as the default
+alloc (no arguments), which allocates from the default zone.

David email@hidden


References: 
 >Meaning of allocWithZone:NULL? (From: Youngjin Kim <email@hidden>)

  • Prev by Date: Meaning of allocWithZone:NULL?
  • Next by Date: Re: How do I add a "New Folder" button?
  • Previous by thread: Meaning of allocWithZone:NULL?
  • Next by thread: Re: Meaning of allocWithZone:NULL?
  • Index(es):
    • Date
    • Thread