AndrewShmig

Untitled

May 1st, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct obj_layout {
  2.     NSUInteger retained;
  3. };
  4.  
  5. + (id)alloc
  6. {
  7.     int size = sizeof(struct objc_layout) + size_of_the_object;
  8.     struct obj_layout *p = (struct obj_layout *)calloc(1, size);
  9.     return (id)(p + 1);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment