- do not delete the namespaces when removing compiler symbols. They still get referenced by some types and must remain until the engine shuts down.
This commit is contained in:
parent
7186342221
commit
d014395dae
2 changed files with 7 additions and 5 deletions
|
|
@ -512,13 +512,16 @@ PNamespace *FNamespaceManager::NewNamespace(int filenum)
|
|||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
// Deallocate the entire namespace manager.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FNamespaceManager::ReleaseSymbols()
|
||||
{
|
||||
RemoveSymbols();
|
||||
for (auto ns : AllNamespaces)
|
||||
{
|
||||
delete ns;
|
||||
}
|
||||
GlobalNamespace = nullptr;
|
||||
AllNamespaces.Clear();
|
||||
}
|
||||
|
|
@ -537,7 +540,7 @@ int FNamespaceManager::RemoveSymbols()
|
|||
for (auto ns : AllNamespaces)
|
||||
{
|
||||
count += ns->Symbols.Symbols.CountUsed();
|
||||
delete ns;
|
||||
ns->Symbols.ReleaseSymbols();
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
|
@ -550,7 +553,6 @@ int FNamespaceManager::RemoveSymbols()
|
|||
|
||||
void RemoveUnusedSymbols()
|
||||
{
|
||||
// Global symbols are not needed anymore after running the compiler.
|
||||
int count = Namespaces.RemoveSymbols();
|
||||
|
||||
// We do not need any non-field and non-function symbols in structs and classes anymore.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue