I'm trying to find the source for NSObject.m
. (I want to compare the pre and post ARC implementations of retain
and release
.)
I've looked on http://www.opensource.apple.com/ and http://www.macosforge.org/ but not been able to find it.
The source code for Apple's NSObject
is contained in the Objective-C runtime package on Apple's open source repository site.
https://opensource.apple.com/source/objc4/objc4-706/runtime/NSObject.mm
The whole Objective-C runtime package can be downloaded from https://opensource.apple.com/tarballs/objc4/objc4-706.tar.gz
Looking back through the previous versions of the runtime package on the site it appears the NSObject.mm
file was added in the objc4-532 package.
The source code for NSObject is available in the Objective-C Runtime (latest version available at the time of this edit) http://opensource.apple.com/source/objc4/objc4-680/runtime/NSObject.mm as noted above. Although Cocoa (Touch) the Framework is not open source if you wanted to see that. Additionally there is another complete implementation of NSObject in the GNUStep Base Package https://github.com/gnustep/base/blob/master/Source/NSObject.m.
I got confused. Apple makes most of Core Foundation (the C API that Foundation/Cocoa is based on) available as open source. Foundation/Cocoa are based on OpenStep. GNUStep is an open source implementation of OpenStep.
The GNUStep implementation on NSObject.m
can be found at http://wiki.gnustep.org/index.php/Main_Page
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With