- be a bit more aggressive with the GC when not running the game loop.
Since most CheckGC calls are within the main game ticker, the engine can accumulate a lot of data when creating/deleting objects in the menu or other UI parts and never manage to collect everything
This commit is contained in:
parent
88be3b8a1b
commit
b4d03501af
4 changed files with 22 additions and 1 deletions
|
|
@ -229,6 +229,7 @@ DObject::DObject ()
|
|||
ObjNext = GC::Root;
|
||||
GCNext = nullptr;
|
||||
GC::Root = this;
|
||||
GC::AllocCount++;
|
||||
}
|
||||
|
||||
DObject::DObject (PClass *inClass)
|
||||
|
|
@ -238,6 +239,7 @@ DObject::DObject (PClass *inClass)
|
|||
ObjNext = GC::Root;
|
||||
GCNext = nullptr;
|
||||
GC::Root = this;
|
||||
GC::AllocCount++;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -275,6 +277,7 @@ DObject::~DObject ()
|
|||
|
||||
void DObject::Release()
|
||||
{
|
||||
if (GC::AllocCount > 0) GC::AllocCount--;
|
||||
DObject **probe;
|
||||
|
||||
// Unlink this object from the GC list.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue