Microsoft DirectX 8.1 (C++)

IDirectMusicPerformance8::CloseDown

The CloseDown method closes down the performance object. An application that created the performance object and called IDirectMusicPerformance8::Init or IDirectMusicPerformance8::InitAudio on it must call CloseDown before the performance is released.

Syntax

HRESULT CloseDown();

Parameters

None.

Return Values

The method returns S_OK.

Remarks

Failure to call CloseDown can cause memory leaks or program failures.

CloseDown handles the release of the IDirectMusic8 interface if this reference was created by IDirectMusicPerformance8::Init or IDirectMusicPerformance8::InitAudio. If the application explicitly created the DirectMusic object, the application is responsible for releasing the reference.

If the DirectSound object was created in the call to Init or InitAudio but no reference was returned to the application, CloseDown also releases DirectSound and all DirectSound buffers. If your application has obtained any interfaces to DirectSound buffers, it should release them before calling Closedown.

If the application created DirectSound explicitly, or obtained a reference form Init or InitAudio, it is responsible for releasing DirectSound.

The method releases any downloaded instruments that have not been unloaded.

Requirements

  Header: Declared in dmusici.h.

See Also