Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <objc/runtime.h>
- @implementation AVPlayerItem(oscahie)
- + (void)load
- {
- Method origMethod = class_getInstanceMethod([self class], NSSelectorFromString(@"dealloc"));
- Method patchMethod = class_getInstanceMethod([self class], @selector(swizzledDealloc));
- method_exchangeImplementations(origMethod, patchMethod);
- }
- - (void)swizzledDealloc
- {
- NSLog(@"deallocating object <%@: %p>", [self class], self);
- [self swizzledDealloc];
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement