Using destructor instead of free function for PrecollisionInteractor
The PrecollisionInteractor
interface provides this free() function to free cuda memory using the CudaMemoryManager
.
However, this could lead to errors since it can be forgotten to call this function. It's much safer to free all memory using the destructor, which is automatically called when the object is deleted.