• 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: NSDocument reference held by NSSavePanel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument reference held by NSSavePanel?


  • Subject: Re: NSDocument reference held by NSSavePanel?
  • From: Michael Ash <email@hidden>
  • Date: Mon, 13 Apr 2009 13:07:01 -0400

On Mon, Apr 13, 2009 at 12:34 PM, Quincey Morris
<email@hidden> wrote:
> On Apr 13, 2009, at 08:08, Michael Ash wrote:
>
>> Can you really withstand having that exclusive resource be occupied
>> for seconds after your document closes?
>
> Actually, in this case, yes.
>
>> If the GC decides not to
>> collect that object for a much longer period of time, say, six years,
>> which it is perfectly within its rights to do, does that work for you?
>
> Not six years. :)
>
> I appreciate your point, and admit your correctness, but in this case the
> timing is insignificant enough to permit me to be lazy and do the resource
> deallocation in -finalize. So, if there are any children watching: Don't do
> this at home. Do as Michael Ash says, not as I do. ;)

I'm confused. If you can't stand six years then you can't rely on
-finalize. Nothing guarantees that it will *ever* be called in a
timely fashion. If it's just a temporary hack that's "good enough" for
your purposes, then fine, but it's incorrect if you ever need to
access this mutually-exclusive resource again without restarting your
app.

Mike
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSDocument reference held by NSSavePanel?
      • From: Quincey Morris <email@hidden>
References: 
 >NSDocument reference held by NSSavePanel? (From: Quincey Morris <email@hidden>)
 >Re: NSDocument reference held by NSSavePanel? (From: Michael Ash <email@hidden>)
 >Re: NSDocument reference held by NSSavePanel? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: How to open two nibs at app launch ? Beginners question
  • Next by Date: Dynamically getting the type of ivars
  • Previous by thread: Re: NSDocument reference held by NSSavePanel?
  • Next by thread: Re: NSDocument reference held by NSSavePanel?
  • Index(es):
    • Date
    • Thread