# ReleaseComObject()

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

```
ReleaseComObject( comObject=any );
```

**Returns:** any

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| comObject | any | Yes | Variable name of a COM object that was created using the function or tag. *Alias: com* |  |

# Examples

```cfml

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

```







# Categories

[Objects](../../categories/object.md)