Unloading Bands
Bands take up memory and should be unloaded when they are no longer in use. If you have enabled automatic downloading of bands, the bands associated with a segment are unloaded automatically when the segment stops. Otherwise, you can manually unload a band in one of the following ways:
- Call the IDirectMusicSegment8::Unload or IDirectMusicBand8::Unload method for instruments downloaded by the corresponding Download method.
- Call the IDirectMusicSegment8::SetParam method for the GUID_Unload or GUID_UnloadFromAudioPath parameter to unload the band in the segment's band track. You can also use IDirectMusicPerformance8::SetParam to set this parameter on the primary segment, or IDirectMusicTrack8::SetParamEx to set it directly on a band track.
The IDirectMusicPerformance8::CloseDown method also unloads any remaining downloaded instruments.
See Also