some time i release the particular object but still it shows Memory Leaks so which kind of condition should i give so that my memory related issue has been solved?that particular object is allocated in Application Delegate class and it's accessed from many View Controller so how should i remove that memory L开发者_运维百科eak?
The golden rule for memory management by reference counting is to concentrate on the scope, where the object is used. You retain it as long as you work with it and release it afterwards.
The whole rationale behind reference counting is to never issue more releases than retains for a certain scope. If you expect an object to get deallocated at a certain point and it doesn't, look for the root cause of the problem.
Could it be, that you erroneously assume a certain object to be autoreleased?
Hope this helps.
精彩评论