• 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: Performance problem with GC enabled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance problem with GC enabled


  • Subject: Re: Performance problem with GC enabled
  • From: "Paul Sanders" <email@hidden>
  • Date: Sat, 14 Mar 2009 10:11:13 -0000

> If Apple later on wants to change how it works
> internally so that the function returns a temporary object instead,
> well, too bad, can't!

Well, that's patently untrue.  It can just return a temporary object with a
retain count of 1.

It comes down to a simple question of whether or not you are happy to entask
programmers to release objects - any object - when they are done with them.
I personally feel a lot happier doing things that way as (a) I can get rid
of things I don't want in timely fashion, and (b) I can test my program for
memory leaks.  Autorelease pools make the latter effectively impossible.
It's no coincidence that a lot of programmers new (and perhaps not-so-new)
to the Mac have object lifetime issues.

I think it is a practical impossibility to prove your app is leak-free under
Cocoa whereas on a certain other platform I can and do check if there is any
memory left allocated at the end of the app (assuming everything is
correctly released on shutdown).  I really miss the ability to do that and I
know for a fact that what I will end up shipping will have memory leaks,
somewhere.

_______________________________________________

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: Performance problem with GC enabled
      • From: Michael Ash <email@hidden>
References: 
 >Performance problem with GC enabled (From: John Engelhart <email@hidden>)
 >Re: Performance problem with GC enabled (From: Bill Bumgarner <email@hidden>)
 >Re: Performance problem with GC enabled (From: Marcel Weiher <email@hidden>)
 >Re: Performance problem with GC enabled (From: "Paul Sanders" <email@hidden>)
 >Re: Performance problem with GC enabled (From: Bill Bumgarner <email@hidden>)
 >Re: Performance problem with GC enabled (From: "Paul Sanders" <email@hidden>)
 >Re: Performance problem with GC enabled (From: Louis Gerbarg <email@hidden>)
 >Re: Performance problem with GC enabled (From: "Paul Sanders" <email@hidden>)
 >Re: Performance problem with GC enabled (From: Kyle Sluder <email@hidden>)
 >Re: Performance problem with GC enabled (From: "Paul Sanders" <email@hidden>)
 >Re: Performance problem with GC enabled (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: NSManagedObject validateForDelete problem
  • Next by Date: Re: Performance problem with GC enabled
  • Previous by thread: Re: Performance problem with GC enabled
  • Next by thread: Re: Performance problem with GC enabled
  • Index(es):
    • Date
    • Thread