Handle your frames with caution...
- Posted: Jun 19, 2014 at 6:00 AM
- 7,931 Views
Bruno Capuano, Friend of the Gallery, has a quick Kinect for Windows v2 tips, that might help you save you from pulling out your hair
Some time ago I wrote a post about the importance of properly destroy the objects of the KinectSdk when you close an app. The lesson today is similar, but bounded to work with a Frame.
For example, the following piece of code shows 2 ways of processing a FRAME with KinectSDK V2
The function between lines 1 and 19, used the frame within a using() and 2nd option does not. The strange thing is that the 2nd option does not give an error or anything. However when not destroyed the dmard, it never returns to process a new frame with what the Kinect information process is stopped for this application.
Lesson learned live!
Project Information URL: http://elbruno.com/2014/06/11/kinectsdk-caution-when-you-work-with-frames-dispose-objects-correctly/