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

Method Destroy

Source/Engine/Scripting/BinaryModule.cpp:708–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706}
707
708void BinaryModule::Destroy(bool isReloading)
709{
710 // Destroy any default script instances
711 for (const auto& type : Types)
712 {
713 if (type.Type == ScriptingTypes::Script && type.Script.DefaultInstance)
714 {
715 Delete(type.Script.DefaultInstance);
716 type.Script.DefaultInstance = nullptr;
717 }
718 }
719
720 // Remove any scripting events
721 for (auto i = ScriptingEvents::EventsTable.Begin(); i.IsNotEnd(); ++i)
722 {
723 const ScriptingTypeHandle type = i->Key.First;
724 if (type.Module == this)
725 ScriptingEvents::EventsTable.Remove(i);
726 }
727
728 // Unregister
729 GetModules().RemoveKeepOrder(this);
730}
731
732ManagedBinaryModule::ManagedBinaryModule(const StringAnsiView& name)
733 : ManagedBinaryModule(New<MAssembly>(nullptr, name))

Callers

nothing calls this directly

Calls 8

DeleteFunction · 0.85
DestroyFunction · 0.85
GetBinaryModuleCorlibFunction · 0.85
RemoveKeepOrderMethod · 0.80
BeginMethod · 0.45
IsNotEndMethod · 0.45
RemoveMethod · 0.45
UnloadMethod · 0.45

Tested by

no test coverage detected