• 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: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))


  • Subject: Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))
  • From: Scott Ribe <email@hidden>
  • Date: Thu, 14 May 2009 08:49:36 -0600
  • Thread-topic: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))

> Please ignore
> the original question.

No ;-)

It is perfectly reasonable for a handful of objects to get allocated and
never freed throughout the lifetime of a run. It is perfectly reasonable for
some such objects to be instantiated lazily rather than at startup. So it is
normal to have some false positives if you look at the whole program
execution.

A standard technique is to exercise a function, then "mark" memory, the
perform the same function and look for leaked memory. This avoids flagging
one-time-only allocations that by design don't get freed, and is what I
typically do during development. Then very late in testing I'll look at the
whole program run and try to make sure that all never-deallocated memory is
appropriate.

Maybe you already knew this, but I thought it was worth posting for the
archives...

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

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: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))
      • From: Cem Karan <email@hidden>
References: 
 >Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD)) (From: Cem Karan <email@hidden>)

  • Prev by Date: Re: Updating NSTableView
  • Next by Date: Re: Updating NSTableView
  • Previous by thread: Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))
  • Next by thread: Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))
  • Index(es):
    • Date
    • Thread