| 134 | } |
| 135 | |
| 136 | MObject* ScriptingObject::GetManagedInstance() const |
| 137 | { |
| 138 | #if USE_NETCORE |
| 139 | const MGCHandle handle = Platform::AtomicRead((int64*)&_gcHandle); |
| 140 | #elif USE_MONO |
| 141 | const MGCHandle handle = Platform::AtomicRead((int32*)&_gcHandle); |
| 142 | #endif |
| 143 | #if USE_CSHARP |
| 144 | return handle ? MCore::GCHandle::GetTarget(handle) : nullptr; |
| 145 | #else |
| 146 | return nullptr; |
| 147 | #endif |
| 148 | } |
| 149 | |
| 150 | MObject* ScriptingObject::GetOrCreateManagedInstance() const |
| 151 | { |
no test coverage detected