bkloppenborg / liboi

OpenCL Interferometry Library
https://github.com/bkloppenborg/liboi/wiki
GNU Lesser General Public License v3.0
5 stars 6 forks source link

Switch to smart pointers internally #23

Open bkloppenborg opened 11 years ago

bkloppenborg commented 11 years ago

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.

bkloppenborg commented 11 years ago

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.