Skip to content

Instantly share code, notes, and snippets.

@phausler
Created January 3, 2014 22:47
Show Gist options
  • Save phausler/8248182 to your computer and use it in GitHub Desktop.
Save phausler/8248182 to your computer and use it in GitHub Desktop.
NSGenericDeallocHandler for tracking when objects die
extern void _NSSetDeallocHandler(id object, void (^block)(void));
_NSSetDeallocHandler(someObject, ^{
NSLog(@"someObject was deallocated");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment