Exemplo n.º 1
0
 /// <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;
         }
     }
 }
Exemplo n.º 2
0
 /// <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;
     }
 }