Method AutomationObject():destroy() Foundation
Disconnects from a COM/ActiveX component.
:destroy() --> self
This method returns the object executing the method (self).
The method :destroy() disconnects the ActiveXObject from the COM/ActiveX component. The connection between an AutomationObject and a COM/ActiveX object is established by the method :create() or the functions GetObject() and CreateObject().
The method :destroy() can be used for optimization purposes. Under normal circumstances, the connection between AutomationObjects and COM/ActiveX components is removed automatically by the Xbase++ Garbage Collector. However, in situations where a large number of AutomationObjects is created in a loop, for example, the asynchronuous nature of the Garbage Collector may cause unused AutomationObjects to accumulate before they are freed. Using method :destroy() to disconnect may increase application performance in such situations.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.