using valgrind to find memory leaks

Reachable blocks are reported but these may be due to OpenCV using Glib