MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / onUnload_MainThread

Method onUnload_MainThread

Source/Engine/Content/Asset.cpp:693–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

691}
692
693void Asset::onUnload_MainThread()
694{
695 // Note: asset should not be locked now (Locker should be free) so other thread won't be locked.
696
697 ASSERT(IsInMainThread());
698
699 // Cancel any streaming before calling OnUnloaded event
700 CancelStreaming();
701
702 // Send event
703 ScopeLock lock(_referencesLocker);
704 for (const auto& e : _references)
705 e.Item->OnAssetUnloaded(this, this);
706 OnUnloaded(this);
707}
708
709bool Asset::WaitForInitGraphics()
710{

Callers

nothing calls this directly

Calls 2

IsInMainThreadFunction · 0.85
OnAssetUnloadedMethod · 0.45

Tested by

no test coverage detected