Frida Docs Unified
    Preparing search index...
    gc: {
        choose(klass: Class): Il2Cpp.Object[];
        collect(generation: 0 | 1 | 2): void;
        collectALittle(): void;
        heapSize: Int64;
        isEnabled: boolean;
        isIncremental: boolean;
        get maxTimeSlice(): Int64;
        set maxTimeSlice(nanoseconds: number | Int64): void;
        startIncrementalCollection(): void;
        startWorld(): void;
        stopWorld(): void;
        usedHeapSize: Int64;
    }

    The object literal to interacts with the garbage collector.

    Type Declaration

    • choose: function
      • Returns the heap allocated objects of the specified class.
        This variant reads GC descriptors.

        Parameters

        Returns Il2Cpp.Object[]

    • collect: function
      • Forces a garbage collection of the specified generation.

        Parameters

        • generation: 0 | 1 | 2

        Returns void

    • collectALittle: function
      • Forces a garbage collection.

        Returns void

    • ReadonlyheapSize: Int64

      Gets the heap size in bytes.

    • isEnabled: boolean

      Determines whether the garbage collector is enabled.

    • ReadonlyisIncremental: boolean

      Determines whether the garbage collector is incremental (source).

    • get maxTimeSlice(): Int64

      Gets the number of nanoseconds the garbage collector can spend in a collection step.

    • set maxTimeSlice(nanoseconds: number | Int64): void

      Sets the number of nanoseconds the garbage collector can spend in a collection step.

    • startIncrementalCollection: function
      • Performs an incremental garbage collection.

        Returns void

    • startWorld: function
      • Resumes all the previously stopped threads.

        Returns void

    • stopWorld: function
      • Stops all threads which may access the garbage collected heap, other than the caller.

        Returns void

    • ReadonlyusedHeapSize: Int64

      Gets the used heap size in bytes.