Table of Contents

Class GC

Namespace
nanoFramework.Runtime.Native
Assembly
nanoFramework.Runtime.Native.dll

Provides a set of methods and properties to control GC (garbage collection), a service that automatically reclaims unused computer memory.

public static class GC
Inheritance
GC
Inherited Members

Methods

EnableGCMessages(bool)

Specifies whether GC (garbage collection) messages are enabled.

public static void EnableGCMessages(bool enable)

Parameters

enable bool

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(bool)

Runs GC (garbage collection), a service that automatically reclaims unused computer memory.

public static uint Run(bool compactHeap)

Parameters

compactHeap bool

true to force heap compaction; otherwise, false.

Returns

uint

The amount of free (unused) memory, in bytes.