ReleaseComObject()

edit

Releases a COM Object and frees up resources that it used.

ReleaseComObject( comObject=any );

Returns: any

Argument Description
comObject
any, required
edit

Variable name of a COM object that was created using the function or tag.

Alias: com

Examples

edit
excelApp = CreateObject("com", "Excel.Application"); // Created Excel Application COM object
workbook = excelApp.Workbooks.Add();
ReleaseComObject(workbook); //released excelApp to prevent memory leak

See also