UEngine::SetTimeUntilNextGarbageCollection

Updates the timer (as a one-off) that is used to trigger garbage collection; this should only be used for things like performance tests, using it recklessly can dramatically increase memory usage and cost of the eventual GC.

Choose your operating system:

Windows

macOS

Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/Engine.h

Include

#include "Engine/Engine.h"

Source

/Engine/Source/Runtime/Engine/Private/UnrealEngine.cpp

Syntax

void SetTimeUntilNextGarbageCollection
(
    float MinTimeUntilNextPass
)

Remarks

Updates the timer (as a one-off) that is used to trigger garbage collection; this should only be used for things like performance tests, using it recklessly can dramatically increase memory usage and cost of the eventual GC.

Things that force a GC will still force a GC after using this method (and they will also reset the timer)