FREE OBJECT

FREE - Release memory occupied by an external object

Effect

Releases the memory needed for object obj. The object cannot be processed afterwards.

SY-SUBRC = 2:

Error during function call in SAPgui.
The OLE function modules are only implemented in Windows.


FREE OBJECT

INCLUDE OLE2INCL. 
DATA EXCEL TYPE OLE2_OBJECT. 
CREATE OBJECT EXCEL 'Excel.Application'. 
FREE   OBJECT EXCEL. 

Related

CREATE OBJECT, SET PROPERTY, GET PROPERTY, CALL METHOD