When my program fishishes calculations I call free function to deallocate vectors previously allocated but I obtain errors, I also tried to call clReleaseMemObject on buffers that have used that data before deallocation but the errors remain. What can be the problem?
The error are:
- corrupted double-linked list
- double free or corruption
- segmentation fault
The type of error depends from if I run on CPU or GPU and if I swap buffers using a temporary buffer not initialized as side variable (the program stil runs correctly, the problem is only freeing memory)