From f0cacc73cdf242e58962deeb7970c5ea6ed9a62a Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Wed, 2 Jan 2013 03:07:16 +0900 Subject: [PATCH 16/36] add destructor (thanks gageas: https://twitter.com/gageas) --- tools/Migemo.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/Migemo.cs b/tools/Migemo.cs index b93eb34..ea995da 100644 --- a/tools/Migemo.cs +++ b/tools/Migemo.cs @@ -145,6 +145,7 @@ namespace KaoriYa.Migemo migemo_close(this.migemoObject); this.migemoObject = IntPtr.Zero; } + GC.SuppressFinalize(this); } public Migemo(string dictpath) @@ -158,6 +159,11 @@ namespace KaoriYa.Migemo { } + ~Migemo() + { + this.Dispose(); + } + #region Test entrypoint #if TEST_MIGEMO // テスト関数 -- 2.39.2