Garbage Collection Feature
\The Sandbox \PB History & Future \New In PB6 \Deployment & Execution \Garbage Collection
Populating the
Error Object
Garbage
Collection

Description

PowerBuilder checks memory for unreferenced and orphaned objects and removes any it finds. When a reference is removed from an object, PowerBuilder counts the remaining references to that object. If there are none, the class is cleared from memory. PowerBuilder checks all reference counts periodically.

Purpose

Garbage collection clears unused objects from memory, ensuring more efficient memory usage. You can use it in development as well as in your deployed application.

In PowerBuilder 6.0, you can rely on garbage collection to destroy unused objects instead of using the Destroy statement. Relying on garbage collection eliminates the risk that an object you destroy may still be referenced by an object or process of which you are unaware.

Usage

Garbage collection occurs automatically in PowerBuilder, but you can use functions to force immediate garbage collection or to change the interval between reference count checks.

Functions

Three functions have been added to let you control when garbage collection occurs:

    GarbageCollect()

    GarbageCollectGetTimeLimit()

    GarbageCollectSetTimeLimit()

For more information

See Garbage Collection.

PBL Peeper PB Help PB History
& Future About Us Feedback Site Map

Google
 
Web www.techno-kitten.com
www.sybase.com