Destroy mod-created CVars when 'restart' is invoked

This commit is contained in:
Kyle Evans 2014-12-01 21:04:50 -06:00
commit 8b88f14c96
3 changed files with 21 additions and 0 deletions

View file

@ -2578,6 +2578,7 @@ void D_DoomMain (void)
new (&gameinfo) gameinfo_t; // Reset gameinfo
S_Shutdown(); // free all channels and delete playlist
C_ClearAliases(); // CCMDs won't be reinitialized so these need to be deleted here
DestroyCVarsFlagged(CVAR_MOD); // Delete any cvar left by mods
GC::FullGC(); // perform one final garbage collection before deleting the class data
PClass::ClearRuntimeData(); // clear all runtime generated class data