uRuntime::uRuntime() { if (uMainThreadPtr != NULL) uFatalError("There is only room for one Uno Runtime object in this process."); uWeakMutex = Xli::CreateMutex(); #ifdef U_DEBUG_MEM uHeapObjects = new Xli::HashMap<uObject*, bool>(); #endif uMainThreadPtr = Xli::GetCurrentThread(); uThreadDataTls = Xli::CreateTls(uFreeThreadData); uAutoReleasePool pool; uInitSupport(); uInitObjectModel(); }
uRuntime::uRuntime() { if (_MainThread) uFatal(NULL, "There is only room for one Uno Runtime object in this process."); _MainThread = Xli::GetCurrentThread(); _Tls = Xli::CreateTls(uFreeThreadData); //#if #(GC:Defined) // uGCInit(); //#else _WeakMutex = Xli::CreateMutex(); //#endif _StrongRefs = new Xli::Array<uRefInfo<uObject**> >(); _WeakRefs = new Xli::Array<uRefInfo<uWeakObject**> >(); #ifdef DEBUG_DUMPS _HeapObjects = new Xli::HashMap<uObject*, bool>(); #endif uAutoReleasePool pool; //#if #(REFLECTION:Defined) uInitReflection(); //#endif uInitSupport(); uInitObjectModel(); //#if #(REFLECTION:Defined) uRegisterIntrinsics(); //#endif }