ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript.V8
V8ScriptEngine Class
V8ScriptEngine Methods
BeginCpuProfile Method
CancelAwaitDebugger Method
CancelInterrupt Method
CollectCpuProfileSample Method
CollectGarbage Method
Compile Method
CompileDocument Method
Dispose Method
EndCpuProfile Method
Evaluate Method
Execute Method
ExecuteCommand Method
GetRuntimeHeapInfo Method
GetStackTrace Method
Interrupt Method
WriteRuntimeHeapSnapshot Method

# V8ScriptEngineCollectGarbage Method

Performs garbage collection.
Namespace: Microsoft.ClearScript.V8
Assembly: ClearScript.V8 (in ClearScript.V8.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public override void CollectGarbage(
    	bool exhaustive
    )

    Public Overrides Sub CollectGarbage (
    	exhaustive As Boolean
    )

    public:
    virtual void CollectGarbage(
    	bool exhaustive
    ) override

    abstract CollectGarbage :
            exhaustive : bool -> unit
    override CollectGarbage :
            exhaustive : bool -> unit

#### Parameters

exhaustive Boolean
  True to perform exhaustive garbage collection, false to favor speed over completeness.

#### Implements

IScriptEngineCollectGarbage(Boolean)
IScriptEngineCollectGarbage(Boolean)
See Also

#### Reference

V8ScriptEngine Class
Microsoft.ClearScript.V8 Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft