Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))
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