mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- the new order requires manual deletion of all class descriptors.
This commit is contained in:
parent
fc9e304189
commit
3e47f00ba0
1 changed files with 4 additions and 5 deletions
|
@ -2842,11 +2842,10 @@ void PClass::StaticShutdown ()
|
|||
p.PendingWeapon = nullptr;
|
||||
}
|
||||
|
||||
// This must be done before the type table is taken down.
|
||||
for (auto cls : AllClasses)
|
||||
{
|
||||
cls->DestroyMeta(cls->Meta);
|
||||
}
|
||||
// This must be done in two steps because the native classes are not ordered by inheritance,
|
||||
// so all meta data must be gone before deleting the actual class objects.
|
||||
for (auto cls : AllClasses) cls->DestroyMeta(cls->Meta);
|
||||
for (auto cls : AllClasses) delete cls;
|
||||
// Unless something went wrong, anything left here should be class and type objects only, which do not own any scripts.
|
||||
bShutdown = true;
|
||||
TypeTable.Clear();
|
||||
|
|
Loading…
Reference in a new issue