mirror of
https://github.com/darlinghq/darling-libobjc2.git
synced 2024-11-23 12:19:44 +00:00
Updated README to give some more information about ARC.
This commit is contained in:
parent
0b9e0fd295
commit
e8583bf4ae
15
README
15
README
@ -447,3 +447,18 @@ The runtime implements the following optimisations:
|
||||
- If an object is autoreleased, returned, and retained, it is just stored in
|
||||
thread-local storage temporarily, not actually autoreleased.
|
||||
- Moving weak references skips the retain / release step.
|
||||
|
||||
ARC requires the ability to interoperate perfectly with manual retain / release
|
||||
code, including the ability for non-ARC code to implement custom reference
|
||||
counting behaviour. If an object implements -_ARCCompliantRetainRelease, then
|
||||
it is advertising that its retain, release, and autorelease implementations are
|
||||
ARC-compatible. These methods may be called explicitly in non-ARC code, but
|
||||
will not be called from ARC.
|
||||
|
||||
ARC moves autorelease pools into the runtime. If NSAutoreleasePool exists and
|
||||
does not implement a -_ARCCompatibleAutoreleasePool method, then it will be
|
||||
used directly. If it does not exist, ARC will implement its own autorelease
|
||||
pools. If it exists and does implement -_ARCCompatibleAutoreleasePool then it
|
||||
must call objc_autoreleasePoolPush() and objc_autoreleasePoolPop() to manage
|
||||
autoreleased object storage and call objc_autorelease() in its -addObject:
|
||||
method.
|
||||
|
Loading…
Reference in New Issue
Block a user