Added release method

For compatibility with OpenCV