Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct obj_layout {
- NSUInteger retained;
- };
- + (id)alloc
- {
- int size = sizeof(struct objc_layout) + size_of_the_object;
- struct obj_layout *p = (struct obj_layout *)calloc(1, size);
- return (id)(p + 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment