Release 10.1A: OpenEdge Development:
Programming Interfaces

> ## Managing Automation objects

> Progress provides the `RELEASE OBJECT` statement to release Automation objects that your application no longer requires. Efficient use of resources requires that you actively manage the Automation objects you instantiate in your application. Each object remains active until there are no remaining references from the Server or other Automation Controllers and one of the following events occurs:

> - The OpenEdge session terminates.

> - You actively release the Automation object.

> To efficiently manage Automation, you must release all Automation objects that you instantiate, either directly (through the `CREATE` Automation Object statement) or indirectly (through properties and methods of other Automation objects). There is no association between Automation objects that automatically propagates the release of one from the release of another.

> In general, always release an Automation object when you are certain no other functionality in your application requires it. Note that if more than one component handle variable references the same Automation object, releasing the object with one handle invalidates them all.

> Caution: To avoid misleading errors while developing your application, set all equivalent component handles to the Unknown value (`?`) after releasing Automation objects on any one of them.

> For more information on managing Automation objects, see the sections on COM object management in Chapter 14, " Using COM Objects in the 4GL."

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095