Forgot to add the grab() and release() calls for the TPGDescriptor object as well in the CppTPGDescriptorWrapper class constructor/destructor.