Class GC
- Namespace
- nanoFramework.Runtime.Native
- Assembly
- nanoFramework.Runtime.Native.dll
Provides a set of methods and properties for interacting with the garbage collector.
public static class GC
- Inheritance
-
GC
- Inherited Members
Methods
EnableGCMessages(bool)
Enables or disables the output of garbage collection messages.
public static void EnableGCMessages(bool enable)
Parameters
Remarks
Enabling GC messages may not always result in output, depending on the target build options. For example, RTM builds, which remove all non-essential features, may not output these messages.
Run(bool)
Forces an immediate garbage collection of all generations.
public static uint Run(bool compactHeap)
Parameters
Returns
- uint
The amount of free memory, in bytes, after the garbage collection.