Force GC to run periodically in order to reduce stuttering
This commit is contained in:
@@ -1041,6 +1041,24 @@ namespace FlaxEngine.Interop
|
||||
valueHandle.Free();
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
internal static void GCCollect(int generation, int mode, bool blocking, bool compacting)
|
||||
{
|
||||
GC.Collect(generation, (GCCollectionMode)mode, blocking, compacting);
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
internal static int GCMaxGeneration()
|
||||
{
|
||||
return GC.MaxGeneration;
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
internal static void GCWaitForPendingFinalizers()
|
||||
{
|
||||
GC.WaitForPendingFinalizers();
|
||||
}
|
||||
|
||||
[UnmanagedCallersOnly]
|
||||
internal static ManagedHandle GetTypeClass(ManagedHandle typeHandle)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user