In C API, when you finished working with video, release CvCapture structure with cvReleaseCapture(), or use Ptr that calls cvReleaseCapture() automatically in the destructor.
Do individual frames need to be freed from memory?
Make sure odds and program are freeing the hands/cards (int*) only once
For the qrenabled-zbar branch