I am creating a desktop application and navigation will be done by using Kinect. (I am using the new interactions introduced in the 1.7 SDK).
I followed an online tutorial and I also noticed a few users complaining about this memory problem.
To be able to navigate using your hand there needs to be a Kinect region on your form and you need to bind a sensor to that region.
// Bind the sensor chooser's current sensor to the KinectRegion
var regionSensorBinding = new Binding("Kinect") { Source = this.sensorChooser };
BindingOperations.SetBinding(this.kinectRegion, KinectRegion.KinectSensorProperty, regionSensorBinding);
I narrowed the memory problem down to those 2 lines.
Every time I now change pages:
(Application.Current.MainWindow.FindName("_mainFrame") as Frame).Source = new Uri("MainMenu.xaml", UriKind.Relative);
The memory usage increases (which is understandable), but it never goes down.
That section of code is on every new page to bind my sensor to that page's kinect region.
Any ideas on why this might be or how I can correct this?
PS: I am using the KinectSensorChooser as in the tutorial, if that makes a difference.