Class GC
Provides a set of methods and properties to control GC (garbage collection), a service that automatically reclaims unused computer memory.
Inherited Members
Namespace: nanoFramework.Runtime.Native
Assembly: nanoFramework.Runtime.Native.dll
Syntax
public static class GC
Methods
EnableGCMessages(Boolean)
Specifies whether GC (garbage collection) messages are enabled.
Declaration
public static extern void EnableGCMessages(bool enable)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enable | true to enable output of messages; otherwise, false. |
Remarks
Despite this method enabling the GC messages there is the possibility of those never being outputted depending on the target build options. RTM builds (which remove all non essential features) are one of those situations.
Run(Boolean)
Runs GC (garbage collection), a service that automatically reclaims unused computer memory.
Declaration
public static extern uint Run(bool compactHeap)
Parameters
Type | Name | Description |
---|---|---|
Boolean | compactHeap | true to force heap compaction; otherwise, false. |
Returns
Type | Description |
---|---|
UInt32 | The amount of free (unused) memory, in bytes. |