COM.FreeVARIANT

From Xojo Documentation

Method

COM.FreeVARIANT(oleVariant as MemoryBlock)

Supported for all project types and targets.

Frees an OLE VARIANT.

Example

// oleVar holds an OLE VARIANT which contains a BSTR that needs to be freed
Var oleVar As MemoryBlock = COM.RBVariantToVARIANT("test")

// ... use oleVar

COM.FreeVARIANT( oleVar )

// Note: it is ok to free any type of OLE VARIANT, for example,
// if the OLE VARIANT contains an Integer, calling FreeVARIANT is harmless