This is desperation, but you can do it:
- disable ARC for the affected object (or bypass it, see below);
- add
retain , autorelease and release - Track saved items with saved save.
The simplest example:
- (void)release { NSLog(@"%@ : %@", self, [NSThread callStackSymbols]); [super release]; }
(although in practice, it is probably much smarter to store the [NSThread callStackSymbols] array for memory management calls in a dictionary indexed, for example, [NSValue valueWithPointer:self] , then to access it either with lldb or by writing it to disk, why need to manually index data efficiently?)
Probably the easiest way to work with ARC is to write one class with ARC disabled, which can handle log memory management methods for the objects you want to track.
Tommy source share