• 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: Cem Karan <email@hidden>
  • Date: Fri, 15 May 2009 06:00:04 -0400

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...

Actually, I didn't think about the fact that I could mark my memory usage; I'll do that and retest. Thank you!


Thanks,
Cem Karan
_______________________________________________

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


References: 
 >Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD)) (From: Scott Ribe <email@hidden>)

  • Prev by Date: Slow scrolling after NSPopup implementation
  • Next by Date: Re: Slow scrolling after NSPopup implementation
  • Previous by thread: Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))
  • Next by thread: Inverting a black and white NSImage
  • Index(es):
    • Date
    • Thread