- fixed some garbage collection issues with interpolations:
* FInterpolator depended on external references to prevent its content from getting GC'd. * none of the pointers in the interpolation objects were declared to the GC. The result of these issues was that changing anything about the life cycle of interpolation objects caused corrupted memory crashes when a level was changed.
This commit is contained in:
parent
e4982b1ced
commit
d347415aee
5 changed files with 31 additions and 14 deletions
|
|
@ -3353,6 +3353,7 @@ extern polyblock_t **PolyBlockMap;
|
|||
|
||||
void P_FreeLevelData ()
|
||||
{
|
||||
interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level.
|
||||
Renderer->CleanLevelData();
|
||||
FPolyObj::ClearAllSubsectorLinks(); // can't be done as part of the polyobj deletion process.
|
||||
SN_StopAllSequences ();
|
||||
|
|
@ -3584,7 +3585,6 @@ void P_SetupLevel (const char *lumpname, int position)
|
|||
|
||||
// Free all level data from the previous map
|
||||
P_FreeLevelData ();
|
||||
interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level.
|
||||
|
||||
MapData *map = P_OpenMapData(lumpname, true);
|
||||
if (map == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue