Is there any way to know which objects retain a target object?
Although using ARC, I don't know why an object wasn't deallocated when it should be. I want to find which objects still retain this object. But how?
I did try using Instruments, but there is no memory leak problem. I check the whole project and I don't find any retain cycle. How can I know which objects retain this object?
You could override the retain method and log the call stack. This will log the call stack backtrace:
- (id)retain {
NSLog(@"%@", [NSThread callStackSymbols]);
return [super retain];
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments