327Building Audio Effect Plug- Ins
release Resources() and the destructor ~DelayAudioProcessor().
These are complementary to the two initialization methods. releaseR-
esources() runs each time audio processing nishes, and it should be
used to free any resources allocated in prepareToPlay(). In this particular
example, no memory was allocated in prepareToPlay() and the delay-
Buffer_ object will be released in the destructor, so releaseResources()
is empty:
void DelayAudioProcessor::releaseResources()
{
// When playback stops, you can use this as an opportunity
// to free up any spare memory, etc.
// The delay buffer will stay in memory until the effect is
// unloaded.
}
The destructor runs once when the plug- in is removed by the host environ ...