How is the swift_waveform_get_samples() buffer allocated?

The function swift_waveform_get_samples() returns the address of the sample data via argument via argument void** samples. Who owns this buffer, who's responsible for allocating space for it, and who's responsible for deallocating it?