Managing COM object resources
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Managing COM object resources
When working with COM objects, especially Automation objects,
it can be very easy to instantiate many object instances (for example, when
searching many objects in a collection). This accumulation of COM objects
can impose a burden on system resources. To alleviate this burden,
ABL provides the RELEASE OBJECT statement. This
statement releases the COM object associated with the specified
component handle, making it available for garbage collection if
no other COM object has a reference to it. In general, it is good
practice to release any COM handles that you no longer need for
your application. It is only necessary to release COM objects that
have been assigned to a component-handle variable.