Allocations in AudioProcessor::numChannelsChanged()?

For multi-channel plugins I tend to use std::vectors for objects used in audio processing like filters and other processors. I resize the vectors in AudioProcessor::numChannelsChanged() to match the new number of channels however it’s just occured to me that this may not be the correct thing to do.

The documentation for numChannelsChanged() doesn’t mention anything about whether or not I should be making allocations when the number of channels has changed:

This method is called when the total number of input or output channels is changed.

Is it safe to allocate memory and what not in numChannelsChanged() as one would do in prepareToPlay, or should I be avoiding it?