• 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: Disposing NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disposing NSArray


  • Subject: Re: Disposing NSArray
  • From: Shin Yamamoto <email@hidden>
  • Date: Fri, 1 Jun 2001 22:40:49 +0900

On Thu, 31 May 2001 22:04:13 -0700, Vince DeMarco <email@hidden>
wrote:
> The rules for release, retain , autorelease are simple.

Simple, yes indeed but depending on where you come from, it could be
confusing especially for those who have some C++ experience, myself
included.

In C++'s constructor-destructor paradigm, an object will be destructed
when it goes out of the scope unless created by 'new', whereas an object
will *eventually* released in Obj-C. Now I've got an idea that the
object will be released at the time of next runloop if retain count is
zero, or at least one should assume this. This was somewhat difficult to
grasp because it gave me a wrong impression that the object would be
released at some arbitrary future point. All because I'd mixed up
fundamentally different two languages.

It would be nice if there was brief introductions to Obj-c for C++,
Jave, or whatever it might be, programmers.

shin


  • Prev by Date: Re: java cocoa appkit application and multiple threads
  • Next by Date: Re: Borland Patent on delegation of object events to event handlers
  • Previous by thread: Re: Disposing NSArray
  • Next by thread: Re: StepWise/CodeFab ScreenSaver Contest Update
  • Index(es):
    • Date
    • Thread