iphone - objective c - Release a singleton property -
i have singleton class has mutabledictionary. initialise dictionary in root viewcontroller. later on empty dictionary , release memory. though retain count 1 release causes crash:
-[cfdictionary release]: message sent deallocated instance
is possible release singleton property?
thanks
first i'll reiterate has been said ton of times on here: don't call -retaincount
!! implementation detail.
see: stackoverflow | when use retaincount excellent recount of why don't use retaincount.
beyond that, i'd recommend looking more information of invariants shoot in writing singletons. dave delong has great recap of how (and more importantly why singletons) way. article includes links other developers , outlooks. i'd recommend familiarizing tenets , re-evaluating implementation.
finally, 1 more time:
please go http://bugreport.apple.com , request -retaincount
deprecated. more people ask it, better.
Comments
Post a Comment