Unloading Bands
Bands take up memory, so they 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 ends. Otherwise, you can manually unload a band in one of the following ways:
- Call the IDirectMusicBand::Unload method.
- Call the IDirectMusicSegment::SetParam method for the GUID_Unload parameter to unload the band in the segment's band track. You can also use IDirectMusicPerformance::SetParam to set this parameter on the primary segment, or IDirectMusicTrack::SetParam to set it directly on the band track. For more information, see Setting and Retrieving Track Parameters. For an example, see Tutorial 1, Step 6: Shut Down DirectMusic.
The IDirectMusicPerformance::CloseDown method also unloads any remaining downloaded instruments.
Last updated on Monday, April 12, 2004
© 1992-2002 Microsoft Corporation. All rights reserved.