GarbageCollectSetTimeLimit PowerScript function
Description
Sets the minimum interval between garbage collection passes.
Syntax
|
1 |
<span>GarbageCollectSetTimeLimit</span> ( <span>newtimeinmilliseconds</span> ) |
|
Argument |
Description |
|---|---|
|
newtimeinmilliseconds |
A long (in milliseconds) that you want If null, the existing interval is not changed. |
Return Values
Long. Returns the interval that existed
before this function was called. If newTime is null,
then null is returned and the current interval
is not changed.
Usage
Specifies the minimum interval between garbage collection
passes: garbage collection passes will not happen before this interval
has expired. Garbage collection can effectively be disabled by setting
the minimum limit to a very large number. If garbage collection
is disabled, unused classes will not be flushed out of the class
cache.
Examples
This example sets the interval between garbage collection
passes to 1 second and sets the variable OldTime to
the length of the previous interval:
|
1 |
long OldTime, NewTime |
|
1 |
NewTime = 1000 /* 1 second */ |
|
1 |
OldTime = <span>GarbageCollectSetTimeLimit</span>(NewTime) |