#copywith_ — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #copywith_, aggregated by home.social.
-
NSCopyObject, the griefer that keeps on griefing
NSCopyObject is a very old Foundation function - pre-dating Mac OS X entirely; from the NeXT era - that was originally basically just memcpy, but now it's complicated. A lot more complicated.
What NSCopyObject does
Its implementation currently starts with essentially:
id NSCopyObject(id object, NSUInteger extraBytes, NSZone *zone) {
if (nil == object) {
return nil;
}
id copy = object_copy(object, extraBytes);
object_setClass(copy, [...]
https://wadetregaskis.com/nscopyobject-the-griefer-that-keeps-on-griefing/
-
NSCopyObject, the griefer that keeps on griefing
NSCopyObject is a very old Foundation function - pre-dating Mac OS X entirely; from the NeXT era - that was originally basically just memcpy, but now it's complicated. A lot more complicated.
What NSCopyObject does
Its implementation currently starts with essentially:
id NSCopyObject(id object, NSUInteger extraBytes, NSZone *zone) {
if (nil == object) {
return nil;
}
id copy = object_copy(object, extraBytes);
object_setClass(copy, [...]
https://wadetregaskis.com/nscopyobject-the-griefer-that-keeps-on-griefing/
-
NSCopyObject, the griefer that keeps on griefing
NSCopyObject is a very old Foundation function - pre-dating Mac OS X entirely; from the NeXT era - that was originally basically just memcpy, but now it's complicated. A lot more complicated.
What NSCopyObject does
Its implementation currently starts with essentially:
id NSCopyObject(id object, NSUInteger extraBytes, NSZone *zone) {
if (nil == object) {
return nil;
}
id copy = object_copy(object, extraBytes);
object_setClass(copy, [...]
https://wadetregaskis.com/nscopyobject-the-griefer-that-keeps-on-griefing/