瀏覽代碼

Make SharpDX dispose of its resources.

Steven Kirk 9 年之前
父節點
當前提交
9ebfa5cd0c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs

+ 1 - 0
src/Windows/Avalonia.Direct2D1/Direct2D1Platform.cs

@@ -43,6 +43,7 @@ namespace Avalonia.Direct2D1
             .BindToSelf(s_d2D1Factory)
             .BindToSelf(s_dwfactory)
             .BindToSelf(s_imagingFactory);
+            SharpDX.Configuration.EnableReleaseOnFinalizer = true;
 
         public IBitmapImpl CreateBitmap(int width, int height)
         {