There is a new under-development Toupcam driver in 3rdparty. It's not stable yet and probably have lots of bugs still. This topic is to check the feedback and development process.
So now it sets exposure time and just pulls the next image as it arrives in the queue. I read on "snap" but I think the camera I was testing it while developing didn't support snapping. Good luck with your development effort! I can take a look at your issue to see if there a memory leak.