System.VarUtils.SafeArrayDestroy

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function SafeArrayDestroy; external oleaut name 'SafeArrayDestroy';

Properties

Type Visibility Source Unit Parent
function external public System.VarUtils.pas System.VarUtils System.VarUtils

Description

Destroys a safe array.

Use SafeArrayDestroy to destroy safe array given through VarArray.

SafeArrayDestroy first checks whether the given safe array is locked or nil. If this is the case, then SafeArrayDestroy returns VAR_ARRAYISLOCKED or VAR_INVALIDARG, correspondingly.

If the safe array is valid, then SafeArrayDestroy removes the actual data from memory using a call to SafeArrayDestroyData and also destroys the associated safe array descriptor with a call to SafeArrayDestroyDescriptor. If SafeArrayDestroy manages to destroy the safe array, it returns a VAR_OK result.

See Also

Code Examples