private void Cleanup()
{
if (pointCloudFrameViewer != null &&
pointCloudFrameViewer.pointCloudImage != null)
{
pointCloudFrameViewer.pointCloudImage.Dispose();
}
if (playerSource != null)
{
playerSource.Dispose();
playerSource = null;
}
if (pointRecorder != null)
{
pointRecorder.Dispose();
pointRecorder = null;
}
if (sensorDevice != null)
{
sensorDevice.Dispose();
sensorDevice = null;
}
}