forceGarbageCollection

Force a garbage collection

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

forceGarbageCollection()

Description

forceGarbageCollection() forces a garbage collection to be performed. This function serves a highly technical purpose. Usually, there should be no need for a user to call this function.

Each time the interactive level is reached, the garbage collection routine is called. A heuristic algorithmn decides whether a garbage collection is really performed. After a call to forceGarbageCollection, a garbage collection will be forced on the next call of the garbage collection routine.

    Note:   forceGarbageCollection does not cause an immediate garbage collection; it is only executed on returning to the interactive level. Therefore, it cannot be used in procedures to release memory during a longer computation.

Examples

Example 1

When the interactive level is reached, a garbage collection is performed:

forceGarbageCollection()

Return Values

Void object of type DOM_NULL.

See Also

MuPAD Functions

Was this topic helpful?