AndrewShmig

Untitled

May 1st, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (void)release
  2. {
  3.     if(NSDecrementExtraRefCountWasZero(self))
  4.         [self dealloc];
  5. }
  6.  
  7. BOOL
  8. NSDecrementExtraRefCountWasZero(id anObject)
  9. {
  10.     if(((struct obj_layout *)anObject)[-1].retained == 0){
  11.         return YES;
  12.     } else {
  13.         ((struct obj_layout *)anObject)[-1].retained--;
  14.         return NO;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment