But when compiling, this has an error:
// zero out memory. (do not overwrite isa & mPoolPredecessor, thus "+2" and "-8") memset((id)object + 2, 0, malloc_size(object) - 8);
The error:
Arithmetic on pointer to interface 'id', which is not a constant size for this architecture and platform
Presumably, that works on older version of Xcode or Objective-C. This is how I was able to make it run:
// zero out memory. (do not overwrite isa & mPoolPredecessor, thus "+2" and "-8") memset((id) (((int *)object) + 2), 0, malloc_size(object) - 8);
Happy Computing! ツ
No comments:
Post a Comment