Hi one my application is crashing with the following error. [CFString release] message sent to deallocated instance *****.How can I know wether the object was in memory or not.Please help me.
1 Answers
Your error is telling you that you're trying to release something that was already released (and deallocated). So using your terminology, it's something that was in memory, but is no longer. You are trying to use a dangling reference to a deallocated object.
If you're writing non-ARC code, I'd suggest you run your code through the static analyzer ("Analyze" on Xcode's "Product" menu), which is excellent at identifying memory related issues that plague non-ARC code.
If you're really trying to analyze all of the calls to retain and release the object in question, see the "Record retain counts" feature in the "Allocations" tool in Instruments (see iOS app with ARC, find who is owner of an object).
If this is for an iOS app, I might also refer you to WWDC 2012 iOS App Performance: Memory.