Mix_FreeChunk -- Free the memory used in chunk, and free chunk itself as well.
#include "SDL.h" void Mix_FreeChunk(Mix_Chunk *chunk);
Free the memory used in chunk, and free chunk itself as well. Do not use chunk after this without loading a new sample to it. Note: It's a bad idea to free a chunk that is still being played...
// free the sample // Mix_Chunk *sample; Mix_FreeChunk(sample); sample=NULL; // to be safe...