/// <summary> /// Release the image and client objects. /// </summary> private void ReleaseObjects() { lock (_loadCompleteCallback) { if (_releaseImageObject && _image != null) { _image.Dispose(); _image = null; } if (_imageFileStream != null) { _imageFileStream.Dispose(); _imageFileStream = null; } } }
/// <summary> /// Release the image and client objects. /// </summary> private void ReleaseObjects() { if (_releaseImageObject && _image != null) { _image.Dispose(); _image = null; } if (_imageFileStream != null) { _imageFileStream.Dispose(); _imageFileStream = null; } if (_client != null) { _client.CancelAsync(); _client.Dispose(); _client = null; } }