• 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: GC pros and cons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GC pros and cons


  • Subject: Re: GC pros and cons
  • From: Kyle Sluder <email@hidden>
  • Date: Thu, 25 Jun 2009 12:11:51 -0700

On Thu, Jun 25, 2009 at 11:39 AM, Peter Ammon<email@hidden> wrote:
> Are you saying that it's not sloppy to close a file twice, unlock a lock
> twice, etc.?

It sounds to me like you were originally referring to language
implementation sloppiness, which has nothing to do with closing a file
twice, unlocking locks multiple times, etc. (client sloppiness).

> Python doesn't require that its contexts be robust against multiple calls to
> __exit__ (its answer to Dispose()).

Now we're back to implementation sloppiness.  I see no guarantee that
__exit__ will only be called once.  Python users don't typically call
__enter__ and __exit__ explicitly; .NET users often call Dispose()
explicitly, because it is useful in situations other than inside using
blocks.

--Kyle Sluder
_______________________________________________

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: GC pros and cons
      • From: Peter Duniho <email@hidden>
    • Re: GC pros and cons
      • From: Peter Ammon <email@hidden>
References: 
 >Re: GC pros and cons (From: Quincey Morris <email@hidden>)
 >Re: GC pros and cons (From: Chris Idou <email@hidden>)
 >RE: GC pros and cons (From: Jeff Laing <email@hidden>)
 >Re: GC pros and cons (From: "Stephen J. Butler" <email@hidden>)
 >Re: GC pros and cons (From: Peter Ammon <email@hidden>)
 >Re: GC pros and cons (From: Kyle Sluder <email@hidden>)
 >Re: GC pros and cons (From: Peter Ammon <email@hidden>)

  • Prev by Date: Re: Debugging NSService
  • Next by Date: Re: Application Support Directory Questions
  • Previous by thread: Re: GC pros and cons
  • Next by thread: Re: GC pros and cons
  • Index(es):
    • Date
    • Thread