mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 18:25:06 +00:00
5bb538ab5c
Summary: This is quite interesting. In Fabric, on C++ layer we store `color` values as `SharedColor` objects which (on iOS) are `shared_ptr`s with custom deallocater (which calls CoreFramework's `CFRelease` function). All this means that we cannot directly transfer ovenership of this managed pointer to ARC (honestly, I am not 100% sure about that, but at least this "shared ownershipt between ARC and non-ARC worlds" concept is as dangerous as any "relying on implementation details" approach). To to so, we have to create a copy and transfer ownership of the copy to ARC (which we do in 1RCTCGColorRefFromSharedColor`). Reviewed By: fkgozali Differential Revision: D8344061 fbshipit-source-id: 8b6764e1539b1982b41f502bbd3307c7b6900fd9