예제 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         OriginalImage?.Dispose();
         Preview?.Dispose();
     }
 }
예제 #2
0
 public void Dispose()
 {
     if (Preview != null)
     {
         Preview.Dispose();
         Preview = null;
     }
     GC.SuppressFinalize(this);
 }
예제 #3
0
 private void Window_Closing(object sender, CancelEventArgs e)
 {
     if (parentWindow is Window)
     {
         Preview.Dispose();
         parentWindow = null;
     }
     if (Preview is Image)
     {
         Preview.Source = null;
     }
 }
예제 #4
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
 protected override void Dispose(bool disposing)
 {
     if (disposing && (components != null))
     {
         if (Preview != null)
         {
             Preview.Dispose();
             Preview = null;
         }
         components.Dispose();
     }
     base.Dispose(disposing);
 }
예제 #5
0
 protected override void DisposeManagedResources()
 {
     base.DisposeManagedResources();
     Preview.Dispose();
     Preview = null;
 }