partial fix

when using unique_ptr for arrays, they are cleaned up by calling
`delete[] bla.release()`.
At least, cppreference says that the release method
"returns a pointer to the managed object and releases the ownership ".
https://en.cppreference.com/w/cpp/memory/unique_ptr
1 job for bugfix/psample-memory-leak