I'm following a tutorial on how to use capture video using the Windows MediaCapture API on Windows Phone and on the code examples, some of the variables are set to null just before assigning a new instance.
private void InitCaptureSettings() {
_captureInitSettings = null;
_captureInitSettings = new Windows.Media.Capture.MediaCaptureInitializationSettings();
_captureInitSettings.AudioDeviceId = "";
_captureInitSettings.VideoDeviceId = "";
_captureInitSettings.StreamingCaptureMode = Windows.Media.Capture.StreamingCaptureMode.AudioAndVideo;
_captureInitSettings.PhotoCaptureSource = Windows.Media.Capture.PhotoCaptureSource.VideoPreview;
if (_deviceList.Count > 0) {
_captureInitSettings.VideoDeviceId = _deviceList[0].Id;
}
}
Is there any reason why this should be done?
Thanks