Show / Hide Table of Contents

    Class GC

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

    Inheritance
    Object
    GC
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    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.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 nanoFramework Contributors
    Generated by DocFX