blMemStorage — A simple data structure to wrap OpenCV’s CvMemStorage with shared_ptr

Introduction As part of the blImageAPI series that we’re running, in this short article, we present a simple data structure used to wrap OpenCV’s CvMemStorage with boost::shared_ptr. The use of boost::shared_ptr allows for automatic garbage collection and lets us check the validity of pointers, which will save us from those horrific opencv…

Continue reading

Simple Memory/Resource Management with Garbage Collection in C++

The Premise We’ve all heard, contrary to what we c++ programmers know, how hard c++ is, and how much harder memory/resource management and garbage collection are in c++. But with a little help from the boost libraries, everything is possible, and downright easy. Resource management and garbage collection are something…

Continue reading