At present liboi uses standard pointers. Although this is fine, memory leaks could be easily introduced if new functions/routines are added in the future. Instead we should switch to std::shared_ptr or something similar to ensure all memory is freed upon exit.
This will likely require some modifications to programs that use liboi. The C-interface may need to unwrap pointers in some instances.
While switching to smart pointers, we should also switch to the cl.hpp header as it has built-in allocation/deallocation methods for OpenCL devices/contexts/memory.
At present liboi uses standard pointers. Although this is fine, memory leaks could be easily introduced if new functions/routines are added in the future. Instead we should switch to std::shared_ptr or something similar to ensure all memory is freed upon exit.
This will likely require some modifications to programs that use liboi. The C-interface may need to unwrap pointers in some instances.