lauromoura pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cd113d7aae746f4bc9c1678e0942aeca64382781

commit cd113d7aae746f4bc9c1678e0942aeca64382781
Author: Bruno da Silva Belo <bruno.b...@expertisesolutions.com.br>
Date:   Thu Nov 14 14:26:16 2019 -0300

    csharp: Disposing IDisposable objects.
    
    Summary: ref T8423
    
    Reviewers: lauromoura, felipealmeida, YOhoho
    
    Reviewed By: lauromoura
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Maniphest Tasks: T8423
    
    Differential Revision: https://phab.enlightenment.org/D10644
---
 src/bindings/mono/efl_mono/UserModel.cs          |   5 +-
 src/tests/efl_mono/BasicDirection.cs             |   1 +
 src/tests/efl_mono/Eina.cs                       | 279 +++++++++++++++++++++++
 src/tests/efl_mono/Eo.cs                         |  40 +++-
 src/tests/efl_mono/EoPromises.cs                 |   6 +
 src/tests/efl_mono/Errors.cs                     |   9 +-
 src/tests/efl_mono/Events.cs                     |  22 +-
 src/tests/efl_mono/FunctionPointerMarshalling.cs |   3 +
 src/tests/efl_mono/FunctionPointers.cs           |   7 +-
 src/tests/efl_mono/Hash.cs                       |   3 +
 src/tests/efl_mono/Inheritance.cs                |   8 +-
 src/tests/efl_mono/Model.cs                      |   7 +-
 src/tests/efl_mono/Parts.cs                      |   8 +
 src/tests/efl_mono/Promises.cs                   |  19 +-
 src/tests/efl_mono/Strbuf.cs                     |   6 +
 src/tests/efl_mono/Strings.cs                    |  24 ++
 src/tests/efl_mono/Structs.cs                    |   9 +
 src/tests/efl_mono/Value.cs                      |  25 +-
 src/tests/efl_mono/ValueEolian.cs                |  19 ++
 19 files changed, 482 insertions(+), 18 deletions(-)

diff --git a/src/bindings/mono/efl_mono/UserModel.cs 
b/src/bindings/mono/efl_mono/UserModel.cs
index 5094c5fd2a..99350b135a 100644
--- a/src/bindings/mono/efl_mono/UserModel.cs
+++ b/src/bindings/mono/efl_mono/UserModel.cs
@@ -29,7 +29,10 @@ internal class ModelHelper
         var properties = typeof(T).GetProperties();
         foreach (var prop in properties)
         {
-            child.SetProperty(prop.Name, ValueFromProperty(o, prop));
+            using (var tmp = ValueFromProperty(o, prop))
+            {
+                child.SetProperty(prop.Name, tmp);
+            }
         }
     }
 
diff --git a/src/tests/efl_mono/BasicDirection.cs 
b/src/tests/efl_mono/BasicDirection.cs
index ceeb22d138..5c20ccb26f 100644
--- a/src/tests/efl_mono/BasicDirection.cs
+++ b/src/tests/efl_mono/BasicDirection.cs
@@ -31,6 +31,7 @@ class TestIntDirections
         t.IntOut(original, out received);
 
         Test.AssertEquals(-original, received);
+        t.Dispose();
     }
 
     /*
diff --git a/src/tests/efl_mono/Eina.cs b/src/tests/efl_mono/Eina.cs
index 1dd57dcf16..b329bc3d9d 100644
--- a/src/tests/efl_mono/Eina.cs
+++ b/src/tests/efl_mono/Eina.cs
@@ -38,6 +38,7 @@ class TestEinaBinbuf
         var binbuf = new Eina.Binbuf();
         Test.Assert(binbuf.Handle != IntPtr.Zero);
         Test.Assert(binbuf.GetBytes().SequenceEqual(Array.Empty<byte>()));
+        binbuf.Dispose();
     }
 
     public static void eina_binbuf_bytes()
@@ -47,6 +48,7 @@ class TestEinaBinbuf
         byte[] cmp = binbuf.GetBytes();
         Test.Assert(cmp != test_string);
         Test.Assert(cmp.SequenceEqual(test_string));
+        binbuf.Dispose();
     }
 
     public static void eina_binbuf_bytes_length()
@@ -58,6 +60,7 @@ class TestEinaBinbuf
         Test.Assert(cmp != test_string);
         Test.Assert(cmp != expected);
         Test.Assert(cmp.SequenceEqual(expected));
+        binbuf.Dispose();
     }
 
     public static void eina_binbuf_copy_ctor()
@@ -70,6 +73,8 @@ class TestEinaBinbuf
         byte[] cmp2 = binbuf2.GetBytes();
         Test.Assert(cmp != cmp2);
         Test.Assert(cmp.SequenceEqual(cmp2));
+        binbuf2.Dispose();
+        binbuf.Dispose();
     }
 
     public static void free_get_null_handle()
@@ -78,6 +83,7 @@ class TestEinaBinbuf
         Test.Assert(binbuf.Handle != IntPtr.Zero);
         binbuf.Free();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
+        binbuf.Dispose();
     }
 
     public static void reset_get_empty_string()
@@ -90,6 +96,7 @@ class TestEinaBinbuf
         binbuf.Reset();
         Test.Assert(binbuf.Handle != IntPtr.Zero);
         Test.Assert(binbuf.GetBytes().SequenceEqual(Array.Empty<byte>()));
+        binbuf.Dispose();
     }
 
     public static void append_bytes()
@@ -99,6 +106,7 @@ class TestEinaBinbuf
         byte[] cmp = binbuf.GetBytes();
         Test.Assert(cmp != test_string);
         Test.Assert(cmp.SequenceEqual(test_string));
+        binbuf.Dispose();
     }
 
     public static void append_bytes_length()
@@ -109,6 +117,7 @@ class TestEinaBinbuf
         byte[] expected = System.Text.Encoding.UTF8.GetBytes("0123456");
         Test.Assert(cmp != expected);
         Test.Assert(cmp.SequenceEqual(expected));
+        binbuf.Dispose();
     }
 
     public static void append_binbuf()
@@ -122,6 +131,8 @@ class TestEinaBinbuf
         Test.Assert(cmp != cmp2);
         Test.Assert(cmp2.SequenceEqual(cmp));
         Test.Assert(cmp2.SequenceEqual(test_string));
+        binbuf2.Dispose();
+        binbuf.Dispose();
     }
 
     public static void append_char()
@@ -133,6 +144,7 @@ class TestEinaBinbuf
         byte[] cmp = binbuf.GetBytes();
         Test.Assert(cmp.Length == 3);
         Test.Assert(cmp[0] == 0 && cmp[1] == 12 && cmp[2] == 42);
+        binbuf.Dispose();
     }
 
     public static void remove()
@@ -143,6 +155,7 @@ class TestEinaBinbuf
         Test.Assert(binbuf.Handle != IntPtr.Zero);
         byte[] expected = System.Text.Encoding.UTF8.GetBytes("019ABCDEF");
         Test.Assert(binbuf.GetBytes().SequenceEqual(expected));
+        binbuf.Dispose();
     }
 
     public static void get_string_native()
@@ -150,6 +163,7 @@ class TestEinaBinbuf
         var binbuf = new Eina.Binbuf(test_string);
         Test.Assert(binbuf.GetBytes().SequenceEqual(test_string));
         Test.Assert(binbuf.GetStringNative() != IntPtr.Zero);
+        binbuf.Dispose();
     }
 
     public static void binbuf_free_string()
@@ -159,6 +173,7 @@ class TestEinaBinbuf
         binbuf.FreeString();
         Test.Assert(binbuf.Handle != IntPtr.Zero);
         Test.Assert(binbuf.GetBytes().SequenceEqual(Array.Empty<byte>()));
+        binbuf.Dispose();
     }
 
     public static void binbuf_length()
@@ -166,6 +181,7 @@ class TestEinaBinbuf
         var binbuf = new Eina.Binbuf(test_string, 6);
         Test.Assert(binbuf.Length == 6);
         Test.Assert(binbuf.GetBytes().Length == 6);
+        binbuf.Dispose();
     }
 
     public static void test_eina_binbuf_in()
@@ -178,6 +194,7 @@ class TestEinaBinbuf
             new byte[]{43, 42, 0x0, 0x2A, 0x42, 33}));
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_binbuf_in_own()
@@ -191,6 +208,7 @@ class TestEinaBinbuf
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
         Test.Assert(t.CheckBinbufInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_binbuf_out()
@@ -205,6 +223,7 @@ class TestEinaBinbuf
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
         Test.Assert(t.CheckBinbufOut());
+        t.Dispose();
     }
 
     public static void test_eina_binbuf_out_own()
@@ -218,6 +237,7 @@ class TestEinaBinbuf
         Test.Assert(binbuf.Append(base_seq));
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_binbuf_return()
@@ -231,6 +251,7 @@ class TestEinaBinbuf
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
         Test.Assert(t.CheckBinbufReturn());
+        t.Dispose();
     }
 
     public static void test_eina_binbuf_return_own()
@@ -243,6 +264,7 @@ class TestEinaBinbuf
         Test.Assert(binbuf.Append(base_seq));
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     // //
@@ -259,6 +281,7 @@ class TestEinaBinbuf
             new byte[]{43, 42, 0x0, 0x2A, 0x42, 33}));
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_inherit_eina_binbuf_in_own()
@@ -273,6 +296,7 @@ class TestEinaBinbuf
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
         Test.Assert(t.binbuf_in_own_still_usable());
+        t.Dispose();
     }
 
     public static void test_inherit_eina_binbuf_out()
@@ -286,6 +310,7 @@ class TestEinaBinbuf
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
         Test.Assert(t.binbuf_out_still_usable());
+        t.Dispose();
     }
 
     public static void test_inherit_eina_binbuf_out_own()
@@ -299,6 +324,7 @@ class TestEinaBinbuf
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
         Test.Assert(t.binbuf_out_own_no_longer_own());
+        t.Dispose();
     }
 
     public static void test_inherit_eina_binbuf_return()
@@ -312,6 +338,7 @@ class TestEinaBinbuf
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
         Test.Assert(t.binbuf_return_still_usable());
+        t.Dispose();
     }
 
     public static void test_inherit_eina_binbuf_return_own()
@@ -325,6 +352,7 @@ class TestEinaBinbuf
         binbuf.Dispose();
         Test.Assert(binbuf.Handle == IntPtr.Zero);
         Test.Assert(t.binbuf_return_own_no_longer_own());
+        t.Dispose();
     }
 }
 
@@ -346,6 +374,7 @@ class TestEinaSlice
 
         Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
         Test.Assert(base_seq.Length == (int)(slc.Len));
+        binbuf.Dispose();
     }
 #endif
 
@@ -361,6 +390,7 @@ class TestEinaSlice
         var binbuf = new Eina.Binbuf();
         binbuf.Append(new Eina.Slice(pinnedPtr, (UIntPtr)3));
         Test.Assert(binbuf.GetBytes().SequenceEqual(base_seq));
+        binbuf.Dispose();
     }
 #endif
 
@@ -369,6 +399,7 @@ class TestEinaSlice
         var t = new Dummy.TestObject();
         var slc = new Eina.Slice(pinnedPtr, (UIntPtr)3);
         Test.Assert(t.EinaSliceIn(slc));
+        t.Dispose();
     }
 
     public static void test_eina_rw_slice_in()
@@ -385,6 +416,7 @@ class TestEinaSlice
         Test.Assert(slc.GetBytes().SequenceEqual(new byte[3]{0x1, 0x2B, 
0x43}));
 
         pinnedRWData.Free();
+        t.Dispose();
     }
 
     public static void test_eina_slice_out()
@@ -395,6 +427,7 @@ class TestEinaSlice
         Test.Assert(slc.Mem != IntPtr.Zero);
         Test.Assert(slc.Length == base_seq.Length);
         Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
+        t.Dispose();
     }
 
     public static void test_eina_rw_slice_out()
@@ -405,6 +438,7 @@ class TestEinaSlice
         Test.Assert(slc.Mem != IntPtr.Zero);
         Test.Assert(slc.Length == base_seq.Length);
         Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
+        t.Dispose();
     }
 
     public static void test_eina_rw_slice_inout()
@@ -419,6 +453,7 @@ class TestEinaSlice
         Test.Assert(slc.Mem != IntPtr.Zero);
         Test.Assert(slc.Length == rw_seq.Length);
         Test.Assert(slc.GetBytes().SequenceEqual(expected_seq));
+        t.Dispose();
     }
 
     /*
@@ -437,6 +472,7 @@ class TestEinaSlice
         var slc = new Eina.Slice(pinnedPtr, (UIntPtr)3);
         Test.Assert(t.EinaSliceIn(slc));
         Test.Assert(t.slice_in_flag);
+        t.Dispose();
     }
 
     public static void test_inherit_eina_rw_slice_in()
@@ -454,6 +490,7 @@ class TestEinaSlice
         Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
 
         pinnedRWData.Free();
+        t.Dispose();
     }
 
     public static void test_inherit_eina_slice_out()
@@ -465,6 +502,7 @@ class TestEinaSlice
         Test.Assert(slc.Mem != IntPtr.Zero);
         Test.Assert(slc.Length == base_seq.Length);
         Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
+        t.Dispose();
     }
 
     public static void test_inherit_eina_rw_slice_out()
@@ -476,6 +514,7 @@ class TestEinaSlice
         Test.Assert(slc.Mem != IntPtr.Zero);
         Test.Assert(slc.Length == base_seq.Length);
         Test.Assert(slc.GetBytes().SequenceEqual(base_seq));
+        t.Dispose();
     }
 }
 
@@ -495,6 +534,7 @@ class TestEinaArray
     {
         var a = new Eina.Array<int>();
         Test.Assert(a.Handle != IntPtr.Zero);
+        a.Dispose();
     }
 
     public static void create_array_from_null()
@@ -509,6 +549,7 @@ class TestEinaArray
         Test.Assert(a.Handle != IntPtr.Zero);
         Test.Assert(a.Push(88));
         Test.Assert(a[0] == 88);
+        a.Dispose();
     }
 
     public static void push_string()
@@ -517,6 +558,7 @@ class TestEinaArray
         Test.Assert(a.Handle != IntPtr.Zero);
         Test.Assert(a.Push("test string §éΨبÿツ"));
         Test.AssertEquals("test string §éΨبÿツ", a[0]);
+        a.Dispose();
     }
 
     public static void push_stringshare()
@@ -525,6 +567,7 @@ class TestEinaArray
         Test.Assert(a.Handle != IntPtr.Zero);
         Test.Assert(a.Push("test string §éΨبÿツ"));
         Test.AssertEquals("test string §éΨبÿツ", a[0].Str);
+        a.Dispose();
     }
 
     public static void push_obj()
@@ -536,6 +579,8 @@ class TestEinaArray
         Test.Assert(a.Push(o));
         Test.Assert(a[0].NativeHandle == o.NativeHandle);
         Test.Assert(a[0].GetNumber() == 88);
+        o.Dispose();
+        a.Dispose();
     }
 
     public static void pop_int()
@@ -545,6 +590,7 @@ class TestEinaArray
         Test.Assert(a.Push(88));
         Test.Assert(a.Pop() == 88);
         Test.Assert(a.Count() == 0);
+        a.Dispose();
     }
 
     public static void pop_string()
@@ -554,6 +600,7 @@ class TestEinaArray
         Test.Assert(a.Push("test string"));
         Test.Assert(a.Pop() == "test string");
         Test.Assert(a.Count() == 0);
+        a.Dispose();
     }
 
     public static void pop_stringshare()
@@ -563,6 +610,7 @@ class TestEinaArray
         Test.Assert(a.Push("test string"));
         Test.Assert(a.Pop() == "test string");
         Test.Assert(a.Count() == 0);
+        a.Dispose();
     }
 
     public static void pop_obj()
@@ -576,6 +624,8 @@ class TestEinaArray
         Test.Assert(p.NativeHandle == o.NativeHandle);
         Test.Assert(p.GetNumber() == 88);
         Test.Assert(a.Count() == 0);
+        o.Dispose();
+        a.Dispose();
     }
 
     public static void data_set_int()
@@ -588,6 +638,7 @@ class TestEinaArray
         Test.Assert(a[0] == 44);
         a[0] = 22;
         Test.Assert(a[0] == 22);
+        a.Dispose();
     }
 
     public static void data_set_string()
@@ -600,6 +651,7 @@ class TestEinaArray
         Test.Assert(a[0] == "other string");
         a[0] = "abc";
         Test.Assert(a[0] == "abc");
+        a.Dispose();
     }
 
     public static void data_set_stringshare()
@@ -612,6 +664,7 @@ class TestEinaArray
         Test.Assert(a[0] == "other string");
         a[0] = "abc";
         Test.Assert(a[0] == "abc");
+        a.Dispose();
     }
 
     public static void data_set_obj()
@@ -639,6 +692,10 @@ class TestEinaArray
         a[0] = o3;
         Test.Assert(a[0].NativeHandle == o3.NativeHandle);
         Test.Assert(a[0].GetNumber() == 22);
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
+        a.Dispose();
     }
 
     public static void count_int()
@@ -655,6 +712,7 @@ class TestEinaArray
         Test.Assert(a.Push(22));
         Test.Assert(a[2] == 22);
         Test.Assert(a.Count() == 3);
+        a.Dispose();
     }
 
     public static void count_string()
@@ -671,6 +729,7 @@ class TestEinaArray
         Test.Assert(a.Push("c"));
         Test.Assert(a[2] == "c");
         Test.Assert(a.Count() == 3);
+        a.Dispose();
     }
 
     public static void count_stringshare()
@@ -687,6 +746,7 @@ class TestEinaArray
         Test.Assert(a.Push("c"));
         Test.Assert(a[2] == "c");
         Test.Assert(a.Count() == 3);
+        a.Dispose();
     }
 
     public static void count_obj()
@@ -716,6 +776,11 @@ class TestEinaArray
         Test.Assert(a[2].NativeHandle == o3.NativeHandle);
         Test.Assert(a[2].GetNumber() == 22);
         Test.Assert(a.Count() == 3);
+
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
+        a.Dispose();
     }
 
     public static void length_int()
@@ -732,6 +797,7 @@ class TestEinaArray
         Test.Assert(a.Push(22));
         Test.Assert(a[2] == 22);
         Test.Assert(a.Length == 3);
+        a.Dispose();
     }
 
     public static void length_string()
@@ -748,6 +814,7 @@ class TestEinaArray
         Test.Assert(a.Push("c"));
         Test.Assert(a[2] == "c");
         Test.Assert(a.Length == 3);
+        a.Dispose();
     }
 
     public static void length_stringshare()
@@ -764,6 +831,7 @@ class TestEinaArray
         Test.Assert(a.Push("c"));
         Test.Assert(a[2] == "c");
         Test.Assert(a.Length == 3);
+        a.Dispose();
     }
 
     public static void eina_array_as_ienumerable_int()
@@ -780,6 +848,7 @@ class TestEinaArray
             Test.AssertEquals(cmp, e);
             cmp /= 2;
         }
+        a.Dispose();
     }
 
     public static void eina_array_as_ienumerable_string()
@@ -796,6 +865,7 @@ class TestEinaArray
             Test.AssertEquals(cmp, e);
             cmp = cmp + "X";
         }
+        a.Dispose();
     }
 
     public static void eina_array_as_ienumerable_stringshare()
@@ -812,6 +882,7 @@ class TestEinaArray
             Test.AssertEquals(cmp, e);
             cmp = cmp + "X";
         }
+        a.Dispose();
     }
 
     public static void eina_array_as_ienumerable_obj()
@@ -837,6 +908,7 @@ class TestEinaArray
             Test.Assert(cmp[i].NativeHandle == e.NativeHandle);
             ++i;
         }
+        arr.Dispose();
     }
 
     // //
@@ -855,6 +927,7 @@ class TestEinaArray
         Test.Assert(arr.ToArray().SequenceEqual(modified_seq_int));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_array_int_in_own()
@@ -868,6 +941,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayIntInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_array_int_out()
@@ -881,6 +955,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayIntOut());
+        t.Dispose();
     }
 
     public static void test_eina_array_int_out_own()
@@ -893,6 +968,7 @@ class TestEinaArray
         Test.Assert(arr.Append(append_seq_int));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_array_int_return()
@@ -905,6 +981,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayIntReturn());
+        t.Dispose();
     }
 
     public static void test_eina_array_int_return_own()
@@ -916,6 +993,7 @@ class TestEinaArray
         Test.Assert(arr.Append(append_seq_int));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     // String //
@@ -929,6 +1007,7 @@ class TestEinaArray
         Test.Assert(arr.ToArray().SequenceEqual(modified_seq_str));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_array_str_in_own()
@@ -942,6 +1021,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayStrInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_array_str_out()
@@ -955,6 +1035,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayStrOut());
+        t.Dispose();
     }
 
     public static void test_eina_array_str_out_own()
@@ -967,6 +1048,7 @@ class TestEinaArray
         Test.Assert(arr.Append(append_seq_str));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_array_str_return()
@@ -979,6 +1061,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayStrReturn());
+        t.Dispose();
     }
 
     public static void test_eina_array_str_return_own()
@@ -990,6 +1073,7 @@ class TestEinaArray
         Test.Assert(arr.Append(append_seq_str));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     // Eina.Stringshare //
@@ -1003,6 +1087,7 @@ class TestEinaArray
         Test.Assert(arr.ToArray().SequenceEqual(modified_seq_strshare));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_array_strshare_in_own()
@@ -1016,6 +1101,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayStrshareInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_array_strshare_out()
@@ -1029,6 +1115,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayStrshareOut());
+        t.Dispose();
     }
 
     public static void test_eina_array_strshare_out_own()
@@ -1041,6 +1128,7 @@ class TestEinaArray
         Test.Assert(arr.Append(append_seq_strshare));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_array_strshare_return()
@@ -1053,6 +1141,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayStrshareReturn());
+        t.Dispose();
     }
 
     public static void test_eina_array_strshare_return_own()
@@ -1064,6 +1153,7 @@ class TestEinaArray
         Test.Assert(arr.Append(append_seq_strshare));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     // Object //
@@ -1078,6 +1168,7 @@ class TestEinaArray
         NumberwrapperSequenceAssertEqual(arr.ToArray(), ModifiedSeqObj());
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_array_obj_in_own()
@@ -1091,6 +1182,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayObjInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_array_obj_out()
@@ -1104,6 +1196,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayObjOut());
+        t.Dispose();
     }
 
     public static void test_eina_array_obj_out_own()
@@ -1116,6 +1209,7 @@ class TestEinaArray
         Test.Assert(arr.Append(AppendSeqObj()));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_array_obj_return()
@@ -1128,6 +1222,7 @@ class TestEinaArray
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaArrayObjReturn());
+        t.Dispose();
     }
 
     public static void test_eina_array_obj_return_own()
@@ -1139,6 +1234,7 @@ class TestEinaArray
         Test.Assert(arr.Append(AppendSeqObj()));
         arr.Dispose();
         Test.Assert(arr.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_array_obj_return_in_same_id()
@@ -1156,6 +1252,8 @@ class TestEinaArray
             Test.Assert(a[i].NativeHandle == b[i].NativeHandle);
             Test.Assert(a[i].NativeHandle == cmp[i].NativeHandle);
         }
+        a.Dispose();
+        t.Dispose();
     }
 
 
@@ -1200,6 +1298,7 @@ class TestEinaInarray
         Test.Assert(a.Push(o) == 0);
         Test.Assert(a[0].NativeHandle == o.NativeHandle);
         Test.Assert(a[0].GetNumber() == 88);
+        o.Dispose();
         a.Dispose();
     }
 
@@ -1234,6 +1333,7 @@ class TestEinaInarray
         Test.Assert(p.NativeHandle == o.NativeHandle);
         Test.Assert(p.GetNumber() == 88);
         Test.Assert(a.Count() == 0);
+        o.Dispose();
         a.Dispose();
     }
 
@@ -1295,6 +1395,9 @@ class TestEinaInarray
         Test.Assert(a[0].GetNumber() == 22);
         Test.Assert(a.Count() == 1);
 
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
         a.Dispose();
     }
 
@@ -1360,6 +1463,9 @@ class TestEinaInarray
         Test.Assert(a[2].GetNumber() == 22);
         Test.Assert(a.Count() == 3);
 
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
         a.Dispose();
     }
 
@@ -1480,6 +1586,7 @@ class TestEinaList
         Test.Assert(lst[0] == 44);
         lst[0] = 22;
         Test.Assert(lst[0] == 22);
+        lst.Dispose();
     }
 
     public static void data_set_string()
@@ -1491,6 +1598,7 @@ class TestEinaList
         Test.Assert(lst[0] == "other string");
         lst[0] = "abc";
         Test.Assert(lst[0] == "abc");
+        lst.Dispose();
     }
 
     public static void data_set_stringshare()
@@ -1502,6 +1610,7 @@ class TestEinaList
         Test.Assert(lst[0] == "other string");
         lst[0] = "abc";
         Test.Assert(lst[0] == "abc");
+        lst.Dispose();
     }
 
     public static void data_set_obj()
@@ -1528,6 +1637,10 @@ class TestEinaList
         lst[0] = o3;
         Test.Assert(lst[0].NativeHandle == o3.NativeHandle);
         Test.Assert(lst[0].GetNumber() == 22);
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
+        lst.Dispose();
     }
 
     public static void append_count_int()
@@ -1543,6 +1656,7 @@ class TestEinaList
         lst.Append(22);
         Test.Assert(lst[2] == 22);
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void append_count_string()
@@ -1558,6 +1672,7 @@ class TestEinaList
         lst.Append("c");
         Test.Assert(lst[2] == "c");
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void append_count_stringshare()
@@ -1573,6 +1688,7 @@ class TestEinaList
         lst.Append("c");
         Test.Assert(lst[2] == "c");
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void append_count_obj()
@@ -1601,6 +1717,10 @@ class TestEinaList
         Test.Assert(lst[2].NativeHandle == o3.NativeHandle);
         Test.Assert(lst[2].GetNumber() == 22);
         Test.Assert(lst.Count() == 3);
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
+        lst.Dispose();
     }
 
     public static void length_int()
@@ -1616,6 +1736,7 @@ class TestEinaList
         lst.Append(22);
         Test.Assert(lst[2] == 22);
         Test.Assert(lst.Length == 3);
+        lst.Dispose();
     }
 
     public static void length_string()
@@ -1631,6 +1752,7 @@ class TestEinaList
         lst.Append("c");
         Test.Assert(lst[2] == "c");
         Test.Assert(lst.Length == 3);
+        lst.Dispose();
     }
 
     public static void length_stringshare()
@@ -1646,6 +1768,7 @@ class TestEinaList
         lst.Append("c");
         Test.Assert(lst[2] == "c");
         Test.Assert(lst.Length == 3);
+        lst.Dispose();
     }
 
     public static void prepend_count_int()
@@ -1661,6 +1784,7 @@ class TestEinaList
         lst.Prepend(22);
         Test.Assert(lst[0] == 22);
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void prepend_count_string()
@@ -1676,6 +1800,7 @@ class TestEinaList
         lst.Prepend("c");
         Test.Assert(lst[0] == "c");
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void prepend_count_stringshare()
@@ -1691,6 +1816,7 @@ class TestEinaList
         lst.Prepend("c");
         Test.Assert(lst[0] == "c");
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void prepend_count_obj()
@@ -1719,6 +1845,11 @@ class TestEinaList
         Test.Assert(lst[0].NativeHandle == o3.NativeHandle);
         Test.Assert(lst[0].GetNumber() == 22);
         Test.Assert(lst.Count() == 3);
+
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
+        lst.Dispose();
     }
 
     public static void sorted_insert_int()
@@ -1730,6 +1861,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 88}));
         lst.SortedInsert(44);
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 44, 88}));
+        lst.Dispose();
     }
 
     public static void sorted_insert_string()
@@ -1741,6 +1873,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "c"}));
         lst.SortedInsert("b");
         Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "b", "c"}));
+        lst.Dispose();
     }
 
     public static void sorted_insert_stringshare()
@@ -1754,6 +1887,7 @@ class TestEinaList
         lst.SortedInsert("b");
         Test.Assert(
             lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"a", "b", 
"c"}));
+        lst.Dispose();
     }
 
     public static void sorted_insert_custom_comparer_natural()
@@ -1769,6 +1903,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{1, 2, 3}));
         lst.SortedInsert(comparator, -1);
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{-1, 1, 2, 3}));
+        lst.Dispose();
     }
 
     public static void sorted_insert_custom_comparer_reversed()
@@ -1784,6 +1919,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{3, 2, 1}));
         lst.SortedInsert(comparator, -1);
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{3, 2, 1, -1}));
+        lst.Dispose();
     }
 
     public static void sorted_insert_custom_comparer_string()
@@ -1799,6 +1935,7 @@ class TestEinaList
         lst.SortedInsert(comparator, "Jumped");
         Test.Assert(lst.ToArray().SequenceEqual(
             new string[]{"Jumped", "Brown", "Quick", "The"}));
+        lst.Dispose();
     }
 
     public static void sort_int()
@@ -1811,6 +1948,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{88, 22, 11, 44}));
         lst.Sort();
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{11, 22, 44, 88}));
+        lst.Dispose();
     }
 
     public static void sort_string()
@@ -1825,6 +1963,7 @@ class TestEinaList
         lst.Sort();
         Test.Assert(
             lst.ToArray().SequenceEqual(new string[]{"a", "b", "c", "d"}));
+        lst.Dispose();
     }
 
     public static void sort_stringshare()
@@ -1839,6 +1978,7 @@ class TestEinaList
         lst.Sort();
         Test.Assert(lst.ToArray().SequenceEqual(
             new Eina.Stringshare[]{"a", "b", "c", "d"}));
+        lst.Dispose();
     }
 
     public static void reverse_int()
@@ -1850,6 +1990,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{22, 44, 88}));
         lst.Reverse();
         Test.Assert(lst.ToArray().SequenceEqual(new int[]{88, 44, 22}));
+        lst.Dispose();
     }
 
     public static void reverse_string()
@@ -1861,6 +2002,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(new string[]{"a", "b", "c"}));
         lst.Reverse();
         Test.Assert(lst.ToArray().SequenceEqual(new string[]{"c", "b", "a"}));
+        lst.Dispose();
     }
 
     public static void reverse_stringshare()
@@ -1874,6 +2016,7 @@ class TestEinaList
         lst.Reverse();
         Test.Assert(
             lst.ToArray().SequenceEqual(new Eina.Stringshare[]{"c", "b", 
"a"}));
+        lst.Dispose();
     }
 
     public static void eina_list_as_ienumerable_int()
@@ -1889,6 +2032,7 @@ class TestEinaList
             Test.AssertEquals(cmp, e);
             cmp /= 2;
         }
+        lst.Dispose();
     }
 
     public static void eina_list_as_ienumerable_string()
@@ -1904,6 +2048,7 @@ class TestEinaList
             Test.AssertEquals(cmp, e);
             cmp = cmp + "X";
         }
+        lst.Dispose();
     }
 
     public static void eina_list_as_ienumerable_stringshare()
@@ -1919,6 +2064,7 @@ class TestEinaList
             Test.AssertEquals(cmp, e);
             cmp = cmp + "X";
         }
+        lst.Dispose();
     }
 
     public static void eina_list_as_ienumerable_obj()
@@ -1943,6 +2089,7 @@ class TestEinaList
             Test.Assert(cmp[i].NativeHandle == e.NativeHandle);
             ++i;
         }
+        lst.Dispose();
     }
 
     // //
@@ -1961,6 +2108,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(base_seq_int));
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_list_int_in_own()
@@ -1973,6 +2121,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListIntInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_list_int_out()
@@ -1985,6 +2134,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListIntOut());
+        t.Dispose();
     }
 
     public static void test_eina_list_int_out_own()
@@ -1997,6 +2147,7 @@ class TestEinaList
         lst.AppendArray(append_seq_int);
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_list_int_return()
@@ -2008,6 +2159,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListIntReturn());
+        t.Dispose();
     }
 
     public static void test_eina_list_int_return_own()
@@ -2019,6 +2171,7 @@ class TestEinaList
         lst.AppendArray(append_seq_int);
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     // String //
@@ -2032,6 +2185,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(base_seq_str));
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_list_str_in_own()
@@ -2044,6 +2198,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListStrInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_list_str_out()
@@ -2056,6 +2211,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListStrOut());
+        t.Dispose();
     }
 
     public static void test_eina_list_str_out_own()
@@ -2068,6 +2224,7 @@ class TestEinaList
         lst.AppendArray(append_seq_str);
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_list_str_return()
@@ -2079,6 +2236,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListStrReturn());
+        t.Dispose();
     }
 
     public static void test_eina_list_str_return_own()
@@ -2090,6 +2248,7 @@ class TestEinaList
         lst.AppendArray(append_seq_str);
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     // Eina.Stringshare //
@@ -2103,6 +2262,7 @@ class TestEinaList
         Test.Assert(lst.ToArray().SequenceEqual(base_seq_strshare));
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_list_strshare_in_own()
@@ -2115,6 +2275,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListStrshareInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_list_strshare_out()
@@ -2127,6 +2288,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListStrshareOut());
+        t.Dispose();
     }
 
     public static void test_eina_list_strshare_out_own()
@@ -2139,6 +2301,7 @@ class TestEinaList
         lst.AppendArray(append_seq_strshare);
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_list_strshare_return()
@@ -2150,6 +2313,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListStrshareReturn());
+        t.Dispose();
     }
 
     public static void test_eina_list_strshare_return_own()
@@ -2161,6 +2325,7 @@ class TestEinaList
         lst.AppendArray(append_seq_strshare);
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     // Object //
@@ -2175,6 +2340,7 @@ class TestEinaList
         NumberwrapperSequenceAssertEqual(lst.ToArray(), BaseSeqObj());
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_list_obj_in_own()
@@ -2187,6 +2353,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListObjInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_list_obj_out()
@@ -2199,6 +2366,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListObjOut());
+        t.Dispose();
     }
 
     public static void test_eina_list_obj_out_own()
@@ -2211,6 +2379,7 @@ class TestEinaList
         lst.AppendArray(AppendSeqObj());
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_list_obj_return()
@@ -2222,6 +2391,7 @@ class TestEinaList
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaListObjReturn());
+        t.Dispose();
     }
 
     public static void test_eina_list_obj_return_own()
@@ -2233,6 +2403,7 @@ class TestEinaList
         lst.AppendArray(AppendSeqObj());
         lst.Dispose();
         Test.Assert(lst.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_list_obj_return_in_same_id()
@@ -2250,6 +2421,8 @@ class TestEinaList
             Test.Assert(a[i].NativeHandle == b[i].NativeHandle);
             Test.Assert(a[i].NativeHandle == cmp[i].NativeHandle);
         }
+        a.Dispose();
+        t.Dispose();
     }
 }
 
@@ -2265,6 +2438,7 @@ class TestEinaInlist
         lst[0] = 22;
         Test.Assert(lst[0] == 22);
         Test.Assert(lst.Count() == 1);
+        lst.Dispose();
     }
 
     public static void data_set_string()
@@ -2277,6 +2451,7 @@ class TestEinaInlist
         lst[0] = "abc";
         Test.Assert(lst[0] == "abc");
         Test.Assert(lst.Count() == 1);
+        lst.Dispose();
     }
 
     public static void data_set_obj()
@@ -2305,6 +2480,10 @@ class TestEinaInlist
         Test.Assert(lst[0].GetNumber() == 22);
 
         Test.Assert(lst.Count() == 1);
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
+        lst.Dispose();
     }
 
     public static void append_count_int()
@@ -2320,6 +2499,7 @@ class TestEinaInlist
         lst.Append(22);
         Test.Assert(lst[2] == 22);
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void append_count_string()
@@ -2335,6 +2515,7 @@ class TestEinaInlist
         lst.Append("c");
         Test.Assert(lst[2] == "c");
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void append_count_obj()
@@ -2363,6 +2544,10 @@ class TestEinaInlist
         Test.Assert(lst[2].NativeHandle == o3.NativeHandle);
         Test.Assert(lst[2].GetNumber() == 22);
         Test.Assert(lst.Count() == 3);
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
+        lst.Dispose();
     }
 
     public static void length_int()
@@ -2378,6 +2563,7 @@ class TestEinaInlist
         lst.Append(22);
         Test.Assert(lst[2] == 22);
         Test.Assert(lst.Length == 3);
+        lst.Dispose();
     }
 
     public static void length_string()
@@ -2393,6 +2579,7 @@ class TestEinaInlist
         lst.Append("c");
         Test.Assert(lst[2] == "c");
         Test.Assert(lst.Length == 3);
+        lst.Dispose();
     }
 
     public static void prepend_count_int()
@@ -2408,6 +2595,7 @@ class TestEinaInlist
         lst.Prepend(22);
         Test.Assert(lst[0] == 22);
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void prepend_count_string()
@@ -2423,6 +2611,7 @@ class TestEinaInlist
         lst.Prepend("c");
         Test.Assert(lst[0] == "c");
         Test.Assert(lst.Count() == 3);
+        lst.Dispose();
     }
 
     public static void prepend_count_obj()
@@ -2451,6 +2640,10 @@ class TestEinaInlist
         Test.Assert(lst[0].NativeHandle == o3.NativeHandle);
         Test.Assert(lst[0].GetNumber() == 22);
         Test.Assert(lst.Count() == 3);
+        o3.Dispose();
+        o2.Dispose();
+        o1.Dispose();
+        lst.Dispose();
     }
 
     public static void eina_inlist_as_ienumerable_int()
@@ -2466,6 +2659,7 @@ class TestEinaInlist
             Test.AssertEquals(cmp, e);
             cmp /= 2;
         }
+        lst.Dispose();
     }
 
     public static void eina_inlist_as_ienumerable_string()
@@ -2481,6 +2675,7 @@ class TestEinaInlist
             Test.AssertEquals(cmp, e);
             cmp = cmp + "X";
         }
+        lst.Dispose();
     }
 
     public static void eina_inlist_as_ienumerable_obj()
@@ -2505,6 +2700,7 @@ class TestEinaInlist
             Test.Assert(cmp[i].NativeHandle == e.NativeHandle);
             ++i;
         }
+        lst.Dispose();
     }
 
 } // < TestEinaInlist
@@ -2601,6 +2797,9 @@ class TestEinaHash
 
         Test.Assert(hsh.Count == 3);
 
+        c.Dispose();
+        b.Dispose();
+        a.Dispose();
         hsh.Dispose();
     }
 
@@ -2721,6 +2920,9 @@ class TestEinaHash
         Test.AssertEquals(count, 3);
         Test.AssertEquals(dct.Count, 0);
 
+        a.Dispose();
+        b.Dispose();
+        c.Dispose();
         hsh.Dispose();
     }
 
@@ -2741,6 +2943,7 @@ class TestEinaHash
         Test.Assert(hsh[44] == 444);
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     /*
@@ -2757,6 +2960,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashIntInOwn());
+        t.Dispose();
     }
     */
 
@@ -2772,6 +2976,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashIntOut());
+        t.Dispose();
     }
 
     /*
@@ -2787,6 +2992,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashIntOutOwn());
+        t.Dispose();
     }
     */
 
@@ -2801,6 +3007,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashIntReturn());
+        t.Dispose();
     }
 
     /*
@@ -2815,6 +3022,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashIntReturnOwn());
+        t.Dispose();
     }
     */
 
@@ -2831,6 +3039,7 @@ class TestEinaHash
         Test.Assert(hsh["bb"] == "bbb");
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_hash_str_in_own()
@@ -2846,6 +3055,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashStrInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_hash_str_out()
@@ -2860,6 +3070,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashStrOut());
+        t.Dispose();
     }
 
     public static void test_eina_hash_str_out_own()
@@ -2874,6 +3085,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashStrOutOwn());
+        t.Dispose();
     }
 
     public static void test_eina_hash_str_return()
@@ -2887,6 +3099,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashStrReturn());
+        t.Dispose();
     }
 
     public static void test_eina_hash_str_return_own()
@@ -2900,6 +3113,7 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashStrReturnOwn());
+        t.Dispose();
     }
 
     // Eina.Stringshare //
@@ -3005,8 +3219,13 @@ class TestEinaHash
         Test.Assert(hsh[nwk2].NativeHandle == nwv2.NativeHandle);
         Test.Assert(hsh[nwk2].GetNumber() == nwv2.GetNumber());
         Test.Assert(hsh[nwk2].GetNumber() == 444);
+        nwk1.Dispose();
+        nwk2.Dispose();
+        nwv1.Dispose();
+        nwv2.Dispose();
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
+        t.Dispose();
     }
 
     public static void test_eina_hash_obj_in_own()
@@ -3029,6 +3248,11 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashObjInOwn(nwk1, nwv1, nwk2, nwv2));
+        nwk1.Dispose();
+        nwk2.Dispose();
+        nwv1.Dispose();
+        nwv2.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_hash_obj_out()
@@ -3048,6 +3272,11 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashObjOut(nwk1, nwv1, nwk2, nwv2));
+        nwk1.Dispose();
+        nwk2.Dispose();
+        nwv1.Dispose();
+        nwv2.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_hash_obj_out_own()
@@ -3064,9 +3293,14 @@ class TestEinaHash
         Dummy.Numberwrapper nwk2 = NW(44);
         Dummy.Numberwrapper nwv2 = NW(444);
         hsh[nwk2] = nwv2;
+        nwk1.Dispose();
+        nwk2.Dispose();
+        nwv1.Dispose();
+        nwv2.Dispose();
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashObjOutOwn());
+        t.Dispose();
     }
 
     public static void test_eina_hash_obj_return()
@@ -3085,6 +3319,11 @@ class TestEinaHash
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashObjReturn(nwk1, nwv1, nwk2, nwv2));
+        nwk1.Dispose();
+        nwk2.Dispose();
+        nwv1.Dispose();
+        nwv2.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_hash_obj_return_own()
@@ -3100,9 +3339,14 @@ class TestEinaHash
         Dummy.Numberwrapper nwk2 = NW(44);
         Dummy.Numberwrapper nwv2 = NW(444);
         hsh[nwk2] = nwv2;
+        nwk1.Dispose();
+        nwk2.Dispose();
+        nwv1.Dispose();
+        nwv2.Dispose();
         hsh.Dispose();
         Test.Assert(hsh.Handle == IntPtr.Zero);
         Test.Assert(t.CheckEinaHashObjReturnOwn());
+        t.Dispose();
     }
 }
 
@@ -3771,6 +4015,7 @@ class TestEinaIterator
         Test.AssertEquals(idx, 3);
 
         itr.Dispose();
+        dct.Dispose();
         hsh.Dispose();
     }
 
@@ -3806,6 +4051,10 @@ class TestEinaIterator
         Test.AssertEquals(idx, 3);
 
         itr.Dispose();
+        a.Dispose();
+        b.Dispose();
+        c.Dispose();
+        dct.Dispose();
         hsh.Dispose();
     }
 
@@ -3834,6 +4083,7 @@ class TestEinaIterator
 
         itr.Dispose();
         arr.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_iterator_int_in_own()
@@ -3859,6 +4109,7 @@ class TestEinaIterator
         arr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorIntInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_int_out()
@@ -3881,6 +4132,7 @@ class TestEinaIterator
         itr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorIntOut());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_int_out_own()
@@ -3901,6 +4153,7 @@ class TestEinaIterator
         Test.AssertEquals(idx, base_seq_int.Length);
 
         itr.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_iterator_int_return()
@@ -3922,6 +4175,7 @@ class TestEinaIterator
         itr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorIntReturn());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_int_return_own()
@@ -3941,6 +4195,7 @@ class TestEinaIterator
         Test.AssertEquals(idx, base_seq_int.Length);
 
         itr.Dispose();
+        t.Dispose();
     }
 
     // String //
@@ -3964,6 +4219,7 @@ class TestEinaIterator
 
         itr.Dispose();
         arr.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_iterator_str_in_own()
@@ -3987,6 +4243,7 @@ class TestEinaIterator
         arr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorStrInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_str_out()
@@ -4009,6 +4266,7 @@ class TestEinaIterator
         itr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorStrOut());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_str_out_own()
@@ -4029,6 +4287,7 @@ class TestEinaIterator
         Test.AssertEquals(idx, base_seq_str.Length);
 
         itr.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_iterator_str_return()
@@ -4050,6 +4309,7 @@ class TestEinaIterator
         itr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorStrReturn());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_str_return_own()
@@ -4069,6 +4329,7 @@ class TestEinaIterator
         Test.AssertEquals(idx, base_seq_str.Length);
 
         itr.Dispose();
+        t.Dispose();
     }
 
     // Eina.Stringshare //
@@ -4092,6 +4353,7 @@ class TestEinaIterator
 
         itr.Dispose();
         arr.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_iterator_strshare_in_own()
@@ -4115,6 +4377,7 @@ class TestEinaIterator
         arr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorStrshareInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_strshare_out()
@@ -4137,6 +4400,7 @@ class TestEinaIterator
         itr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorStrshareOut());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_strshare_out_own()
@@ -4157,6 +4421,7 @@ class TestEinaIterator
         Test.AssertEquals(idx, base_seq_strshare.Length);
 
         itr.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_iterator_strshare_return()
@@ -4178,6 +4443,7 @@ class TestEinaIterator
         itr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorStrshareReturn());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_strshare_return_own()
@@ -4197,6 +4463,7 @@ class TestEinaIterator
         Test.AssertEquals(idx, base_seq_strshare.Length);
 
         itr.Dispose();
+        t.Dispose();
     }
 
     // Object //
@@ -4220,6 +4487,7 @@ class TestEinaIterator
 
         itr.Dispose();
         arr.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_iterator_obj_in_own()
@@ -4243,6 +4511,7 @@ class TestEinaIterator
         arr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorObjInOwn());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_obj_out()
@@ -4267,6 +4536,7 @@ class TestEinaIterator
         itr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorObjOut());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_obj_out_own()
@@ -4289,6 +4559,7 @@ class TestEinaIterator
         Test.AssertEquals(idx, base_seq_obj.Length);
 
         itr.Dispose();
+        t.Dispose();
     }
 
     public static void test_eina_iterator_obj_return()
@@ -4312,6 +4583,7 @@ class TestEinaIterator
         itr.Dispose();
 
         Test.Assert(t.CheckEinaIteratorObjReturn());
+        t.Dispose();
     }
 
     public static void test_eina_iterator_obj_return_own()
@@ -4333,6 +4605,7 @@ class TestEinaIterator
         Test.AssertEquals(idx, base_seq_obj.Length);
 
         itr.Dispose();
+        t.Dispose();
     }
 } // < TestEinaIterator
 
@@ -4355,6 +4628,8 @@ class TestEinaAccessor
         {
             Test.AssertEquals(pair.Item1, pair.Item2);
         }
+
+        lst.Dispose();
     }
 
     public static void basic_accessor_array()
@@ -4370,6 +4645,8 @@ class TestEinaAccessor
         {
             Test.AssertEquals(pair.Item1, pair.Item2);
         }
+
+        arr.Dispose();
     }
 
     public static void basic_accessor_inlist()
@@ -4388,6 +4665,7 @@ class TestEinaAccessor
         {
             Test.AssertEquals(pair.Item1, pair.Item2);
         }
+        lst.Dispose();
     }
 
     public static void basic_accessor_inarray()
@@ -4403,6 +4681,7 @@ class TestEinaAccessor
         {
             Test.AssertEquals(pair.Item1, pair.Item2);
         }
+        arr.Dispose();
     }
 }
 
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index e9ddb66fac..dec54ba31a 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -28,6 +28,7 @@ class TestEo
         var testing = new Dummy.TestObject();
         var o1 = testing.ReturnNullObject();
         Test.Assert(o1 == null);
+        testing.Dispose();
     }
 
     //
@@ -42,6 +43,7 @@ class TestEo
         var o2 = o1.ReturnObject();
         Test.Assert(o2.NativeHandle != IntPtr.Zero);
         Test.Assert(o2.NativeHandle == o1.NativeHandle);
+        testing.Dispose();
     }
     /* Commented out as adding the event listener seems to prevent it from 
being GC'd.
     public static void destructor_really_frees()
@@ -121,12 +123,12 @@ class TestEoInherit
     {
         Efl.Object loop = new MyObject();
         Test.Assert(loop.NativeHandle != System.IntPtr.Zero);
+        loop.Dispose();
     }
 
     private static WeakReference CreateCollectableInherited()
     {
-        var obj = new MyObject();
-        return new WeakReference(obj);
+        return new WeakReference(new MyObject());
     }
 
     public static void inherited_collected()
@@ -147,6 +149,7 @@ class TestEoNames
         string name = "Dummy";
         obj.SetName(name);
         Test.AssertEquals(name, obj.GetName());
+        obj.Dispose();
     }
 }
 
@@ -161,6 +164,8 @@ class TestEoParent
 
         var parent_retrieved = child.GetParent() as Dummy.TestObject;
         Test.AssertEquals(parent, parent_retrieved);
+        child.Dispose();
+        parent.Dispose();
     }
 
     public static void parent_inherited_class()
@@ -172,6 +177,8 @@ class TestEoParent
 
         Dummy.Numberwrapper parent_retrieved = child.GetParent() as 
Dummy.Numberwrapper;
         Test.AssertEquals(parent, parent_retrieved);
+        child.Dispose();
+        parent.Dispose();
     }
 
     private class Derived : Dummy.TestObject
@@ -190,6 +197,8 @@ class TestEoParent
 
         var parent_from_cast = child.GetParent() as Derived;
         Test.AssertEquals(parent, parent_from_cast);
+        child.Dispose();
+        parent.Dispose();
     }
 }
 
@@ -222,7 +231,7 @@ class TestTypedefs
 
         Test.AssertEquals((Dummy.MyInt)ret, input);
         Test.AssertEquals(receiver, input);
-
+        obj.Dispose();
     }
 }
 
@@ -262,6 +271,8 @@ class TestEoAccessors
         {
             Test.AssertEquals(pair.Item1, pair.Item2);
         }
+        lst.Dispose();
+        obj.Dispose();
     }
 }
 
@@ -282,6 +293,7 @@ class TestEoFinalize
     {
         Inherit inherit = new Inherit();
         Test.Assert(inherit.finalizeCalled);
+        inherit.Dispose();
     }
 }
 
@@ -315,8 +327,11 @@ class TestEoMultipleChildClasses
         SecondChild obj2 = new SecondChild();
         Test.AssertEquals(2, obj2.receivedValue);
 
+        obj.Dispose();
         obj = new FirstChild();
         Test.AssertEquals(1, obj.receivedValue);
+        obj2.Dispose();
+        obj.Dispose();
     }
 }
 
@@ -329,12 +344,14 @@ class TestCsharpProperties
         obj.Name = name;
 
         Test.AssertEquals(name, obj.Name);
+        obj.Dispose();
     }
 
     public static void test_getter_only()
     {
         var obj = new Dummy.TestObject();
         Test.Assert(!obj.Invalidating);
+        obj.Dispose();
     }
 
     public static void test_setter_only()
@@ -344,6 +361,7 @@ class TestCsharpProperties
 
         obj.SetterOnly = val;
         Test.AssertEquals(val, obj.GetSetterOnly());
+        obj.Dispose();
     }
 
     public static void test_class_property()
@@ -359,6 +377,7 @@ class TestCsharpProperties
         Dummy.ITestIface iface = new Dummy.TestObject();
         iface.IfaceProp = val;
         Test.AssertEquals(val, iface.IfaceProp);
+        iface.Dispose();
     }
 
     public static void test_csharp_multi_valued_prop()
@@ -367,6 +386,7 @@ class TestCsharpProperties
         obj.MultiValuedProp = (1, 2);
         var ret = obj.MultiValuedProp;
         Test.AssertEquals(ret, (1, 2));
+        obj.Dispose();
     }
 }
 
@@ -386,6 +406,7 @@ class TestEoGrandChildrenFinalize
     {
         Child obj = new Child();
         Test.AssertEquals(42, obj.receivedValue);
+        obj.Dispose();
     }
 
     public sealed class GrandChild : Dummy.Child
@@ -409,6 +430,7 @@ class TestEoGrandChildrenFinalize
     {
         GrandChild obj = new GrandChild();
         Test.AssertEquals(-42, obj.receivedValue);
+        obj.Dispose();
     }
 }
 
@@ -429,7 +451,7 @@ class TestConstructors
         var obj = new Dummy.Child(null, a, b, iface_prop);
 #endif
         Test.AssertEquals(iface_prop, obj.IfaceProp);
-
+        obj.Dispose();
 #if EFL_BETA
         obj = new Dummy.Child(parent: null, ifaceProp : iface_prop, 
doubleParamsA : a, doubleParamsB : b,
                               obligatoryBetaCtor : beta,
@@ -443,6 +465,7 @@ class TestConstructors
         Test.Assert(obj.ObligatoryBetaCtorWasCalled);
         Test.Assert(obj.OptionalBetaCtorWasCalled);
 #endif
+        obj.Dispose();
     }
 
     public static void test_optional_constructor()
@@ -457,6 +480,7 @@ class TestConstructors
         var obj = new Dummy.Child(null, a, b);
 #endif
         Test.Assert(!obj.GetIfaceWasSet());
+        obj.Dispose();
     }
 }
 
@@ -470,6 +494,7 @@ class TestInterfaceConcrete
 
         iface.IfaceProp = 1970;
         Test.AssertEquals(iface.IfaceProp, 1970);
+        obj.Dispose();
     }
 }
 
@@ -482,6 +507,7 @@ class TestProvider
         Dummy.Numberwrapper provider = 
obj.FindProvider(typeof(Dummy.Numberwrapper)) as Dummy.Numberwrapper;
         Test.AssertEquals(provider.GetType(), typeof(Dummy.Numberwrapper));
         Test.AssertEquals(provider.GetNumber(), 1999);
+        obj.Dispose();
     }
 
     private class ProviderHolder : Dummy.TestObject
@@ -526,7 +552,7 @@ class TestProvider
         provider = obj.CallFindProviderForIface();
         Test.AssertNotNull(provider, msg : "Provider of ITestIFace must not be 
null");
         Test.AssertEquals(provider.Name, obj.ProviderName, "Provider name does 
not match expected");
-
+        obj.Dispose();
     }
 }
 
@@ -542,6 +568,7 @@ class TestObjectDeletion
         part.Del();
 
         Test.AssertNull(obj.OnePart);
+        obj.Dispose();
     }
 }
 
@@ -564,12 +591,14 @@ class TestProtectedInterfaceMembers
     {
         var obj = new Dummy.TestObject();
         Test.AssertEquals(obj.CallMethodProtected(42), -42);
+        obj.Dispose();
     }
 
     public static void 
test_protected_interface_in_inherited_class_called_from_c()
     {
         var obj = new MyObject();
         Test.AssertEquals(obj.CallMethodProtected(42), 42 * 42);
+        obj.Dispose();
     }
 
     public static void test_interface_skipped_protected()
@@ -640,6 +669,7 @@ class TestHiddenClasses
         var hidden = obj.HiddenObject;
 
         Test.AssertEquals(hidden.Name, "hidden_object");
+        obj.Dispose();
     }
 }
 
diff --git a/src/tests/efl_mono/EoPromises.cs b/src/tests/efl_mono/EoPromises.cs
index 18acbe82ba..d16a762817 100644
--- a/src/tests/efl_mono/EoPromises.cs
+++ b/src/tests/efl_mono/EoPromises.cs
@@ -72,6 +72,7 @@ class TestEoPromises
         loop.Iterate();
         Test.Assert(callbackCalled, "Future callback must have been called.");
         Test.AssertEquals(receivedValue, sentValue);
+        obj.Dispose();
     }
 
     public static void test_object_promise_cancel()
@@ -97,6 +98,7 @@ class TestEoPromises
         loop.Iterate();
         Test.Assert(callbackCalled, "Future callback must have been called.");
         Test.AssertEquals(receivedError, sentError);
+        obj.Dispose();
     }
 
 }
@@ -144,6 +146,7 @@ class TestEoAsyncMethods
         int receivedValue;
         v.Get(out receivedValue);
         Test.AssertEquals(receivedValue, sentValue);
+        obj.Dispose();
     }
 
     public static void test_async_cancel()
@@ -173,6 +176,8 @@ class TestEoAsyncMethods
         }
 
         Test.Assert(raised, "AggregateException must have been raised.");
+        cancelSrc.Dispose();
+        obj.Dispose();
     }
 
     public static void test_async_reject()
@@ -205,6 +210,7 @@ class TestEoAsyncMethods
         }
 
         Test.Assert(raised, "AggregateException must have been raised.");
+        obj.Dispose();
     }
 }
 }
diff --git a/src/tests/efl_mono/Errors.cs b/src/tests/efl_mono/Errors.cs
index 94156e9a16..d3b1c69970 100644
--- a/src/tests/efl_mono/Errors.cs
+++ b/src/tests/efl_mono/Errors.cs
@@ -53,6 +53,7 @@ class TestEolianError
         var obj = new Overrider();
 
         Test.AssertRaises<Efl.EflException>(obj.CallChildrenRaiseError);
+        obj.Dispose();
     }
 
     // return eina_error
@@ -70,6 +71,7 @@ class TestEolianError
         error = obj.ReturnsError();
 
         Test.AssertEquals(expected, error);
+        obj.Dispose();
     }
 
     class ReturnOverride : Dummy.TestObject {
@@ -97,6 +99,7 @@ class TestEolianError
         error = obj.ReturnsError();
 
         Test.AssertEquals(new Eina.Error(expected * 2), error);
+        obj.Dispose();
     }
 
     // events
@@ -114,11 +117,13 @@ class TestEolianError
         // An event whose managed delegate generates an exception
         // must set an eina_error so it can be reported back to
         // the managed code
-        var obj = new Dummy.TestObject();
+        var  obj = new Dummy.TestObject();
         Listener listener = new Listener();
         obj.EvtWithIntEvent += listener.callback;
 
-        Test.AssertRaises<Efl.EflException>(() => { obj.EmitEventWithInt(2); 
});
+        Test.AssertRaises<Efl.EflException>(() =>
+        { obj.EmitEventWithInt(2); });
+        obj.Dispose();
     }
 }
 }
diff --git a/src/tests/efl_mono/Events.cs b/src/tests/efl_mono/Events.cs
index 4e31375e3e..88a7e8b1e1 100644
--- a/src/tests/efl_mono/Events.cs
+++ b/src/tests/efl_mono/Events.cs
@@ -36,6 +36,7 @@ class TestEoEvents
         Eina.Value v = new Eina.Value(Eina.ValueType.Int32);
         v.Set(0);
         loop.Quit(v);
+        v.Dispose();
     }
     protected void another_callback(object sender, EventArgs e) { }
 
@@ -70,6 +71,7 @@ class TestEoEvents
         obj.EmitEventWithString("Some args");
 
         Test.AssertEquals("Some args", received_string);
+        obj.Dispose();
     }
 
     public static void event_with_int_payload()
@@ -84,6 +86,7 @@ class TestEoEvents
         obj.EmitEventWithInt(-1984);
 
         Test.AssertEquals(-1984, received_int);
+        obj.Dispose();
     }
 
     public static void event_with_bool_payload()
@@ -102,6 +105,7 @@ class TestEoEvents
         obj.EmitEventWithBool(false);
 
         Test.AssertEquals(false, received_bool);
+        obj.Dispose();
     }
 
     public static void event_with_uint_payload()
@@ -115,6 +119,7 @@ class TestEoEvents
         obj.EmitEventWithUint(0xbeef);
 
         Test.AssertEquals<uint>(0xbeef, received_uint);
+        obj.Dispose();
     }
 
     public static void event_with_float_payload()
@@ -128,6 +133,7 @@ class TestEoEvents
         obj.EmitEventWithFloat(3.14f);
 
         Test.AssertAlmostEquals(3.14f, received_float);
+        obj.Dispose();
     }
 
     public static void event_with_double_payload()
@@ -142,6 +148,7 @@ class TestEoEvents
         obj.EmitEventWithDouble(reference);
 
         Test.AssertAlmostEquals(reference, received_double);
+        obj.Dispose();
     }
 
     public static void event_with_object_payload()
@@ -158,6 +165,8 @@ class TestEoEvents
         obj.EmitEventWithObj(sent_obj);
 
         Test.AssertEquals(sent_obj, received_obj);
+        sent_obj.Dispose();
+        obj.Dispose();
     }
 
     public static void event_with_error_payload()
@@ -174,6 +183,7 @@ class TestEoEvents
         obj.EmitEventWithError(sent_error);
 
         Test.AssertEquals(sent_error, received_error);
+        obj.Dispose();
     }
 
     public static void event_with_struct_payload()
@@ -191,6 +201,7 @@ class TestEoEvents
         obj.EmitEventWithStruct(sent_struct);
 
         Test.AssertEquals(sent_struct.Fstring, received_struct.Fstring);
+        obj.Dispose();
     }
 
 #if EFL_BETA
@@ -208,6 +219,7 @@ class TestEoEvents
         obj.EmitEventWithStructComplex(sent_struct);
 
         Test.AssertEquals(sent_struct.Fobj, received_struct.Fobj);
+        obj.Dispose();
     }
 #endif
 
@@ -230,7 +242,12 @@ class TestEoEvents
         Test.AssertEquals(sent.Length, received.Length);
         var pairs = sent.Zip(received, (string sentItem, string receivedItem) 
=> new { Sent = sentItem, Received = receivedItem } );
         foreach (var pair in pairs)
+        {
             Test.AssertEquals(pair.Sent, pair.Received);
+        }
+        sent.Dispose();
+        received.Dispose();
+        obj.Dispose();
     }
 }
 
@@ -253,6 +270,7 @@ class TestEventAddRemove
         obj.EvtWithIntEvent -= evtCb;
         obj.EmitEventWithInt(42);
         Test.Assert(!called);
+        obj.Dispose();
     }
 }
 
@@ -270,6 +288,7 @@ class TestInterfaceEvents
         obj.NonconflictedEvent += cb;
         obj.EmitNonconflicted();
         Test.Assert(called);
+        obj.Dispose();
     }
 }
 
@@ -290,7 +309,7 @@ class TestEventNaming
         obj.EmitEventWithUnder();
 
         Test.Assert(test_called);
-
+        obj.Dispose();
     }
 }
 
@@ -342,6 +361,7 @@ class TestEventWithDeadWrappers
         Test.CollectAndIterate();
 
         Test.AssertNull(wref.Target);
+        manager.Dispose();
     }
 
 }
diff --git a/src/tests/efl_mono/FunctionPointerMarshalling.cs 
b/src/tests/efl_mono/FunctionPointerMarshalling.cs
index 8c7fa41b79..16bb60ba61 100644
--- a/src/tests/efl_mono/FunctionPointerMarshalling.cs
+++ b/src/tests/efl_mono/FunctionPointerMarshalling.cs
@@ -41,6 +41,9 @@ class TestFunctionPointerMarshalling
 
         Test.Assert(called, "Callback was not called");
         Test.AssertEquals(reference, buf.Steal());
+        v.Dispose();
+        buf.Dispose();
+        obj.Dispose();
     }
 }
 }
diff --git a/src/tests/efl_mono/FunctionPointers.cs 
b/src/tests/efl_mono/FunctionPointers.cs
index 5c32669e60..62ec9c3932 100644
--- a/src/tests/efl_mono/FunctionPointers.cs
+++ b/src/tests/efl_mono/FunctionPointers.cs
@@ -53,6 +53,7 @@ class TestFunctionPointers
 
         Test.Assert(called, "call_callback must call a callback");
         Test.AssertEquals(42 * 2, x);
+        obj.Dispose();
     }
 
     public static void set_callback_with_lambda()
@@ -71,6 +72,7 @@ class TestFunctionPointers
 
         Test.Assert(called, "call_callback must call a callback");
         Test.AssertEquals(37 + 4, x);
+        obj.Dispose();
     }
 
     public static void replace_callback()
@@ -96,6 +98,7 @@ class TestFunctionPointers
         x = obj.CallCallback(42);
         Test.Assert(new_called, "call_callback must call a callback");
         Test.AssertEquals(42 * 42, x);
+        obj.Dispose();
     }
 
     class NoOverride : Dummy.TestObject {
@@ -112,6 +115,7 @@ class TestFunctionPointers
 
         Test.Assert(called, "call_callback must call a callback");
         Test.AssertEquals(42 * 3, x);
+        obj.Dispose();
     }
 
     class WithOverride : Dummy.TestObject {
@@ -151,6 +155,7 @@ class TestFunctionPointers
 
         Test.Assert(called, "call_callback must call a callback");
         Test.AssertEquals(42 * 3, x);
+        obj.Dispose();
     }
 
     // These are needed due to issues calling methods on obj from the GC 
thread (where the
@@ -202,7 +207,7 @@ class TestFunctionPointers
 
         Test.Assert(called, "call_callback must call a callback");
         Test.AssertEquals(42 * 2, x);
-
+        obj.Dispose();
     }
 }
 
diff --git a/src/tests/efl_mono/Hash.cs b/src/tests/efl_mono/Hash.cs
index e064e47a13..abb18df770 100644
--- a/src/tests/efl_mono/Hash.cs
+++ b/src/tests/efl_mono/Hash.cs
@@ -21,6 +21,7 @@ class TestHash
         Test.AssertEquals(hash.Count, 2);
 
         Test.Assert(!hash.DelByValue(200));
+        hash.Dispose();
     }
 
     public static void test_del_value_string()
@@ -39,6 +40,7 @@ class TestHash
         Test.AssertEquals(hash.Count, 2);
 
         Test.Assert(!hash.DelByValue("Elementary"));
+        hash.Dispose();
     }
 
     public static void test_del_key()
@@ -50,6 +52,7 @@ class TestHash
 
         hash.DelByKey(1);
         Test.AssertEquals(hash.Count, 2);
+        hash.Dispose();
     }
 }
 } // namespace TestSuite
diff --git a/src/tests/efl_mono/Inheritance.cs 
b/src/tests/efl_mono/Inheritance.cs
index 387b042bbd..06c4d1b4c4 100644
--- a/src/tests/efl_mono/Inheritance.cs
+++ b/src/tests/efl_mono/Inheritance.cs
@@ -49,7 +49,7 @@ class TestInheritance
             return "Hello World";
         }
     }
-    
+
     internal class Inherit3Parent : Dummy.TestObject
     {
         public bool disposed = false;
@@ -95,6 +95,7 @@ class TestInheritance
         var obj = new Inherit1();
         int i = Dummy.InheritHelper.ReceiveDummyAndCallIntOut(obj);
         Test.AssertEquals (50, i);
+        obj.Dispose();
     }
 
     public static void test_inherit_from_iface()
@@ -104,6 +105,7 @@ class TestInheritance
         Test.AssertEquals (50, i);
         string s = Dummy.InheritHelper.ReceiveDummyAndCallInStringshare(obj);
         Test.AssertEquals ("Hello World", s);
+        obj.Dispose();
     }
 
     private static void CreateAndCheckInheritedObjects(out WeakReference 
parentWRef, out WeakReference childWRef)
@@ -127,8 +129,8 @@ class TestInheritance
         Test.AssertEquals(false, parent.disposed);
         Test.AssertEquals(false, parent.childDisposed);
 
-        parent = null;
-        child = null;
+        child.Dispose();
+        parent.Dispose();
     }
 
     public static void test_inherit_lifetime()
diff --git a/src/tests/efl_mono/Model.cs b/src/tests/efl_mono/Model.cs
index 144318b8a1..bb6ba3b01c 100644
--- a/src/tests/efl_mono/Model.cs
+++ b/src/tests/efl_mono/Model.cs
@@ -32,7 +32,8 @@ public static class TestModel {
     {
         Efl.Loop loop = Efl.App.AppMain;
 
-        CreateModel(loop);
+        var model = CreateModel(loop);
+        model.Dispose();
     }
 
     internal static async Task EasyModelExtractionAsync (Efl.Loop loop)
@@ -49,6 +50,8 @@ public static class TestModel {
         Test.AssertEquals(r.Name, "Tomato");
 
         loop.End();
+        model.Dispose();
+        veggies.Dispose();
     }
 
     public static void easy_model_extraction ()
@@ -77,6 +80,8 @@ public static class TestModel {
 
         Test.Assert(callbackCalled, "Property bound callback must have been 
called.");
         Test.AssertEquals(propertyBound, "style");
+        factory.Dispose();
+        parent.Dispose();
     }
 }
 
diff --git a/src/tests/efl_mono/Parts.cs b/src/tests/efl_mono/Parts.cs
index 33ae37d2a4..3e2da24152 100644
--- a/src/tests/efl_mono/Parts.cs
+++ b/src/tests/efl_mono/Parts.cs
@@ -31,6 +31,7 @@ public static class TestParts
     {
         var t = new Dummy.PartHolder();
         do_part_test(t);
+        t.Dispose();
     }
 
     private class Child : Dummy.PartHolder
@@ -41,6 +42,7 @@ public static class TestParts
     public static void inherited_part_test() {
         var t = new Child();
         do_part_test(t);
+        t.Dispose();
     }
 
     private static void do_part_test(Dummy.PartHolder t)
@@ -66,6 +68,8 @@ public static class TestMVVMParts
         var error = bindablePart.Markup().Bind("name");
 
         Test.AssertEquals(error, Eina.Error.NO_ERROR);
+        factory.Dispose();
+        parent.Dispose();
     }
 
     public static void mvvm_factory_properties()
@@ -78,6 +82,9 @@ public static class TestMVVMParts
         var error = factory.IconPart().BindFactory(iconFactory);
 
         Test.AssertEquals(error, Eina.Error.NO_ERROR);
+        iconFactory.Dispose();
+        factory.Dispose();
+        parent.Dispose();
     }
 }
 
@@ -92,6 +99,7 @@ public static class TestNamedParts
         Test.AssertEquals("part_one", p1.GetName());
         Test.Assert(p2 is Dummy.TestObject);
         Test.AssertEquals("part_two", p2.GetName());
+        obj.Dispose();
     }
 }
 
diff --git a/src/tests/efl_mono/Promises.cs b/src/tests/efl_mono/Promises.cs
index 8b50e329da..7a7afff631 100644
--- a/src/tests/efl_mono/Promises.cs
+++ b/src/tests/efl_mono/Promises.cs
@@ -30,6 +30,7 @@ class TestPromises
         Test.Assert(cleanCalled, "Promise clean callback should have been 
called.");
         Test.AssertRaises<ObjectDisposedException>(() => { 
promise.Resolve(null); });
         Test.AssertRaises<ObjectDisposedException>(future.Cancel);
+        promise.Dispose();
     }
 
     public static void test_simple_resolve()
@@ -55,6 +56,8 @@ class TestPromises
 
         Test.Assert(callbackCalled, "Future callback should have been 
called.");
         Test.AssertEquals(received_value, reference_value);
+        reference_value.Dispose();
+        promise.Dispose();
     }
 
     public static void test_simple_with_object()
@@ -74,12 +77,16 @@ class TestPromises
 
         Eina.Value referenceValue = new Eina.Value(Eina.ValueType.Array, 
Eina.ValueType.Int32);
         referenceValue.Append(32);
-        promise.Resolve(new Eina.Value(referenceValue));
+        var tmp = new Eina.Value(referenceValue);
+        promise.Resolve(tmp);
 
         loop.Iterate();
 
         Test.Assert(callbackCalled, "Future callback should have been 
called.");
         Test.AssertEquals(receivedValue, referenceValue);
+        tmp.Dispose();
+        referenceValue.Dispose();
+        promise.Dispose();
     }
 
     public static void test_simple_reject()
@@ -106,6 +113,7 @@ class TestPromises
 
         Test.AssertRaises<ObjectDisposedException>(() => { 
promise.Resolve(null); });
         Test.AssertRaises<ObjectDisposedException>(future.Cancel);
+        promise.Dispose();
     }
 
     public static void test_simple_future_cancel()
@@ -128,6 +136,7 @@ class TestPromises
         Test.Assert(promiseCallbackCalled, "Promise cancel callback should 
have been called.");
         Test.Assert(callbackCalled, "Future callback should have been 
called.");
         Test.AssertEquals(received_error, Eina.Error.ECANCELED);
+        promise.Dispose();
     }
 
 
@@ -172,6 +181,8 @@ class TestPromises
 
         Test.AssertRaises<ObjectDisposedException>(() => { 
promise.Resolve(null); });
         Test.AssertRaises<ObjectDisposedException>(future.Cancel);
+        reference_value.Dispose();
+        promise.Dispose();
     }
 
     public static void test_then_chain_array()
@@ -217,6 +228,8 @@ class TestPromises
 
         Test.AssertRaises<ObjectDisposedException>(() => { 
promise.Resolve(null); });
         Test.AssertRaises<ObjectDisposedException>(future.Cancel);
+        reference_value.Dispose();
+        promise.Dispose();
     }
 
     public static void test_cancel_after_resolve()
@@ -244,6 +257,7 @@ class TestPromises
 
         Test.AssertRaises<ObjectDisposedException>(() => { 
promise.Resolve(null); });
         Test.AssertRaises<ObjectDisposedException>(future.Cancel);
+        promise.Dispose();
     }
 
     public static void test_constructor_with_callback()
@@ -270,6 +284,9 @@ class TestPromises
 
         Test.Assert(callbackCalled, "Future callback should have been 
called.");
         Test.AssertEquals(received_value, reference_value);
+        promise.Dispose();
+        loop.Dispose();
+        reference_value.Dispose();
     }
 
     public static void test_reject_on_disposal()
diff --git a/src/tests/efl_mono/Strbuf.cs b/src/tests/efl_mono/Strbuf.cs
index fa7ccfdbe6..7cd96cb7a3 100644
--- a/src/tests/efl_mono/Strbuf.cs
+++ b/src/tests/efl_mono/Strbuf.cs
@@ -29,6 +29,7 @@ class TestStrBuf
 
         Test.AssertEquals("Here's Jonnny!".Length, buf.Length);
         Test.AssertEquals("Here's Johnny!", buf.Steal());
+        buf.Dispose();
     }
 
     public static void test_tostring()
@@ -39,6 +40,7 @@ class TestStrBuf
         buf.Append("World!");
 
         Test.AssertEquals("Hello World!", buf.ToString());
+        buf.Dispose();
     }
 
     public static void test_eolian()
@@ -50,6 +52,8 @@ class TestStrBuf
         obj.AppendToStrbuf(buf, " to buf");
 
         Test.AssertEquals("Appended to buf", buf.Steal());
+        buf.Dispose();
+        obj.Dispose();
     }
 
     private class Appender : Dummy.TestObject
@@ -79,6 +83,8 @@ class TestStrBuf
 
         Test.Assert(obj.called);
         Test.AssertEquals("Is this virtual?", buf.Steal());
+        buf.Dispose();
+        obj.Dispose();
     }
 }
 } // namespace TestSuite
diff --git a/src/tests/efl_mono/Strings.cs b/src/tests/efl_mono/Strings.cs
index 43c6717ec3..afbf282d03 100644
--- a/src/tests/efl_mono/Strings.cs
+++ b/src/tests/efl_mono/Strings.cs
@@ -28,6 +28,7 @@ class TestStrings
             String sent = "in_string";
             String returned = obj.InString(sent);
             Test.AssertEquals(sent, returned);
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -41,6 +42,7 @@ class TestStrings
             String sent = "in_own_string";
             String returned = obj.InOwnString(sent);
             Test.AssertEquals(sent, returned);
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -51,6 +53,7 @@ class TestStrings
         {
             var obj = new Dummy.TestObject();
             Test.AssertEquals("string", obj.ReturnString());
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -61,6 +64,7 @@ class TestStrings
         {
             var obj = new Dummy.TestObject();
             Test.AssertEquals("own_string", obj.ReturnOwnString());
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -73,6 +77,7 @@ class TestStrings
             var obj = new Dummy.TestObject();
             obj.OutString(out str);
             Test.AssertEquals("out_string", str);
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -86,6 +91,7 @@ class TestStrings
             obj.OutOwnString(out str);
             Test.AssertEquals(str.ToString(CultureInfo.CurrentCulture),
                               "out_own_string");
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -143,6 +149,7 @@ class TestStrings
             Test.AssertEquals(sent, obj.received_in);
         /* } */
         System.GC.Collect();
+        obj.Dispose();
     }
 
     /* The managed wrapper should take ownership of the in parameter */
@@ -155,6 +162,7 @@ class TestStrings
             Test.AssertEquals(sent, obj.received_in_own);
         /* } */
         System.GC.Collect();
+        obj.Dispose();
     }
 
     /* The managed wrapper still owns the returned C string. We need to cache 
it until
@@ -165,6 +173,7 @@ class TestStrings
         /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for 
memory leaks. */
         Test.AssertEquals("inherited", obj.CallReturnString());
         System.GC.Collect();
+        obj.Dispose();
     }
 
     /* The managed wrapper must surrender the ownership to the C after the 
virtual call. */
@@ -174,6 +183,7 @@ class TestStrings
         /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for 
memory leaks. */
         Test.AssertEquals("own_inherited", obj.CallReturnOwnString());
         System.GC.Collect();
+        obj.Dispose();
     }
 
     /* The managed wrapper still owns the C string after the call. Like return 
without own, we may
@@ -184,6 +194,7 @@ class TestStrings
         /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for 
memory leaks. */
         Test.AssertEquals("out_inherited", obj.CallOutString());
         System.GC.Collect();
+        obj.Dispose();
     }
 
     /* The managed wrapper gives C the ownership of the filled out parameter */
@@ -193,6 +204,7 @@ class TestStrings
         /* for (int i = 0; i < 10000; i ++) // Uncomment this to check for 
memory leaks. */
         Test.AssertEquals("out_own_inherited", obj.CallOutOwnString());
         System.GC.Collect();
+        obj.Dispose();
     }
 
 }
@@ -206,6 +218,7 @@ class TestStringshare
             String sent = "in_stringshare";
             String returned = obj.InStringshare(sent);
             Test.AssertEquals(sent, returned);
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -217,6 +230,7 @@ class TestStringshare
             String sent = "in_own_stringshare";
             String returned = obj.InOwnStringshare(sent);
             Test.AssertEquals(sent, returned);
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -226,6 +240,7 @@ class TestStringshare
         {
             var obj = new Dummy.TestObject();
             Test.AssertEquals("stringshare", obj.ReturnStringshare());
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -235,6 +250,7 @@ class TestStringshare
         {
             var obj = new Dummy.TestObject();
             Test.AssertEquals("own_stringshare", obj.ReturnOwnStringshare());
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -246,6 +262,7 @@ class TestStringshare
             var obj = new Dummy.TestObject();
             obj.OutStringshare(out str);
             Test.AssertEquals("out_stringshare", str);
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -258,6 +275,7 @@ class TestStringshare
             obj.OutOwnStringshare(out str);
             Test.AssertEquals(str.ToString(CultureInfo.CurrentCulture),
                               "out_own_stringshare");
+            obj.Dispose();
         }
         System.GC.Collect();
     }
@@ -310,6 +328,7 @@ class TestStringshare
         String sent = "in_inherited";
         obj.CallInStringshare(sent);
         Test.AssertEquals(sent, obj.received_in);
+        obj.Dispose();
     }
 
     public static void in_own_stringshare_from_virtual()
@@ -318,6 +337,7 @@ class TestStringshare
         String sent = "in_own_inherited";
         obj.CallInOwnStringshare(sent);
         Test.AssertEquals(sent, obj.received_in_own);
+        obj.Dispose();
     }
 
     public static void return_stringshare_from_virtual()
@@ -325,6 +345,7 @@ class TestStringshare
         var obj = new StringshareReturner();
         // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for 
memory leaks.
         Test.AssertEquals("inherited", obj.CallReturnStringshare());
+        obj.Dispose();
     }
 
     public static void return_own_stringshare_from_virtual()
@@ -332,6 +353,7 @@ class TestStringshare
         var obj = new StringshareReturner();
         // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for 
memory leaks.
         Test.AssertEquals("own_inherited", obj.CallReturnOwnStringshare());
+        obj.Dispose();
     }
 
     public static void out_stringshare_from_virtual()
@@ -339,6 +361,7 @@ class TestStringshare
         var obj = new StringshareReturner();
         // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for 
memory leaks.
         Test.AssertEquals("out_inherited", obj.CallOutStringshare());
+        obj.Dispose();
     }
 
     public static void out_own_stringshare_from_virtual()
@@ -346,6 +369,7 @@ class TestStringshare
         var obj = new StringshareReturner();
         // for (int i = 0; i < 1000000; i ++) // Uncomment this to check for 
memory leaks.
         Test.AssertEquals("out_own_inherited", obj.CallOutOwnStringshare());
+        obj.Dispose();
     }
 }
 
diff --git a/src/tests/efl_mono/Structs.cs b/src/tests/efl_mono/Structs.cs
index 66d4e3a015..998610c785 100644
--- a/src/tests/efl_mono/Structs.cs
+++ b/src/tests/efl_mono/Structs.cs
@@ -62,6 +62,7 @@ internal class TestStructs
         var t = new Dummy.TestObject();
         bool r = t.StructSimpleIn(simple);
         Test.Assert(r, "Function returned false");
+        t.Dispose();
     }
 
     /*
@@ -95,6 +96,7 @@ internal class TestStructs
         bool r = t.StructSimpleOut(out simple);
         Test.Assert(r, "Function returned false");
         checkStructSimple(simple);
+        t.Dispose();
     }
 
     /*
@@ -122,6 +124,7 @@ internal class TestStructs
         var t = new Dummy.TestObject();
         var simple = t.StructSimpleReturn();
         checkStructSimple(simple);
+        t.Dispose();
     }
 
     /*
@@ -236,6 +239,7 @@ internal class TestStructs
         t.CallStructSimpleIn(simple);
         Test.Assert(t.called);
         Test.AssertEquals(simple.Fstring, t.received.Fstring);
+        t.Dispose();
     }
 
     /*
@@ -269,6 +273,7 @@ internal class TestStructs
         t.CallStructSimpleOut(out simple);
         Test.Assert(t.called, "override was not called");
         Test.AssertEquals("Virtual Struct Out", simple.Fstring);
+        t.Dispose();
     }
 
     /*
@@ -297,6 +302,7 @@ internal class TestStructs
         Dummy.StructSimple simple = t.CallStructSimpleReturn();
         Test.Assert(t.called, "override was not called");
         Test.AssertEquals("Virtual Struct Return", simple.Fstring);
+        t.Dispose();
     }
 
     /*
@@ -325,6 +331,7 @@ internal class TestStructs
         var t = new Dummy.TestObject();
         bool r = t.StructComplexIn(complex);
         Test.Assert(r, "Function returned false");
+        t.Dispose();
     }
 
     // public static void complex_ptr_in()
@@ -342,6 +349,7 @@ internal class TestStructs
         bool r = t.StructComplexOut(out complex);
         Test.Assert(r, "Function returned false");
         checkStructComplex(complex);
+        t.Dispose();
     }
 
     // public static void complex_ptr_out()
@@ -357,6 +365,7 @@ internal class TestStructs
         var t = new Dummy.TestObject();
         var complex = t.StructComplexReturn();
         checkStructComplex(complex);
+        t.Dispose();
     }
 #endif
     // public static void complex_ptr_return()
diff --git a/src/tests/efl_mono/Value.cs b/src/tests/efl_mono/Value.cs
index ec71e1e2a2..29856d44ce 100644
--- a/src/tests/efl_mono/Value.cs
+++ b/src/tests/efl_mono/Value.cs
@@ -172,6 +172,8 @@ public static class TestEinaValue {
             Efl.Object target;
             Test.Assert(v.Get(out target));
             Test.AssertEquals(target, obj);
+            target.Dispose();
+            obj.Dispose();
         }
     }
 
@@ -329,6 +331,8 @@ public static class TestEinaValue {
             Efl.Object received = null;
             Test.Assert(a.Get(out received));
             Test.AssertEquals(expected, received);
+            received.Dispose();
+            expected.Dispose();
         }
     }
 
@@ -364,6 +368,7 @@ public static class TestEinaValue {
 
             Test.Assert(a.Reset());
             Test.Assert(a.Set(expected));
+            actual.Dispose();
         }
     }
     public static void TestValueOptionalLists()
@@ -395,6 +400,7 @@ public static class TestEinaValue {
             Eina.Value actual = null;
             Test.Assert(a.Get(out actual));
             Test.AssertEquals(expected, actual);
+            actual.Dispose();
         }
     }
 
@@ -865,6 +871,9 @@ public static class TestEinaValue {
 
             Test.AssertEquals((Efl.Object)array[0], c);
             Test.AssertEquals((Efl.Object)array[1], b);
+            c.Dispose();
+            b.Dispose();
+            a.Dispose();
         }
     }
 
@@ -1027,6 +1036,7 @@ public static class TestEinaValue {
         int rec_val;
         Test.Assert(v2.Get(out rec_val));
         Test.AssertEquals(raw_val, rec_val);
+        v2.Dispose();
     }
 
     // FIXME Add remaining list tests
@@ -1123,6 +1133,7 @@ public static class TestValueFromObject
             Test.Assert(v.Set(newObj));
             prop.SetValue(source, v.Unwrap());
             Test.AssertEquals(prop.GetValue(source), newObj);
+            newObj.Dispose();
         }
     }
 
@@ -1163,14 +1174,18 @@ public static class TestValueFromObject
         Test.AssertEquals(toCheck[0], 100);
         Test.AssertEquals(toCheck[1], 200);
         Test.AssertEquals(toCheck[2], 300);
+        v.Dispose();
     }
 
     public static void TestObjectContainerFromToObject()
     {
         var initialBag = new Eina.Array<Efl.Object>();
-        initialBag.Push(new Dummy.TestObject());
-        initialBag.Push(new Dummy.TestObject());
-        initialBag.Push(new Dummy.TestObject());
+        var tmp1 = new Dummy.TestObject();
+        var tmp2 = new Dummy.TestObject();
+        var tmp3 = new Dummy.TestObject();
+        initialBag.Push(tmp1);
+        initialBag.Push(tmp2);
+        initialBag.Push(tmp3);
 
         var source = new ComplexHolder { BagOfObjects = initialBag };
         var prop = source.GetType().GetProperty("BagOfObjects");
@@ -1199,6 +1214,10 @@ public static class TestValueFromObject
         Test.AssertEquals(toCheck[0], first);
         Test.AssertEquals(toCheck[1], second);
         Test.AssertEquals(toCheck[2], third);
+        tmp3.Dispose();
+        tmp2.Dispose();
+        tmp1.Dispose();
+        v.Dispose();
     }
 }
 #pragma warning restore 1591
diff --git a/src/tests/efl_mono/ValueEolian.cs 
b/src/tests/efl_mono/ValueEolian.cs
index 305de71dc2..77ec4aca0b 100644
--- a/src/tests/efl_mono/ValueEolian.cs
+++ b/src/tests/efl_mono/ValueEolian.cs
@@ -38,6 +38,7 @@ public static class TestEinaValueEolian {
             Test.AssertEquals(v, v_received);
             v_received.Dispose();
         }
+        obj.Dispose();
     }
 
     public static void TestEolianEinaValueInOwn()
@@ -58,6 +59,7 @@ public static class TestEinaValueEolian {
 
             obj.ClearValue();
         }
+        obj.Dispose();
     }
 
     public static void TestEolianEinaValueOut()
@@ -73,7 +75,9 @@ public static class TestEinaValueEolian {
 
             Test.AssertEquals(v, v_out);
             Test.AssertEquals(Eina.Ownership.Unmanaged, v_out.Ownership);
+            v_out.Dispose();
         }
+        obj.Dispose();
     }
 
     public static void TestEolianEinaValueOutOwn()
@@ -89,7 +93,9 @@ public static class TestEinaValueEolian {
 
             Test.AssertEquals(v, v_out);
             Test.AssertEquals(Eina.Ownership.Managed, v_out.Ownership);
+            v_out.Dispose();
         }
+        obj.Dispose();
     }
 
     public static void TestEolianEinaValueOutByValue()
@@ -105,7 +111,9 @@ public static class TestEinaValueEolian {
 
             Test.AssertEquals(v, v_out);
             Test.AssertEquals(Eina.Ownership.Managed, v_out.Ownership);
+            v_out.Dispose();
         }
+        obj.Dispose();
     }
 
     private class ValueHandler : Dummy.TestObject
@@ -130,6 +138,7 @@ public static class TestEinaValueEolian {
             obj.CallSetValue(val);
             Test.AssertEquals(val, obj.value);
         }
+        obj.Dispose();
     }
 
     public static void TestEolianEinaValueImplicitOperators()
@@ -141,6 +150,7 @@ public static class TestEinaValueEolian {
         var expected = new Eina.Value(1999);
         var received = new Eina.Value(Eina.ValueType.String);
 
+        received.Dispose();
         obj.OutValue(out received);
         Test.AssertEquals(expected, received);
         Test.AssertEquals(Eina.ValueType.Int32, received.GetValueType());
@@ -148,6 +158,7 @@ public static class TestEinaValueEolian {
         int i = received;
         Test.AssertEquals(i, 1999);
 
+        expected.Dispose();
         expected = new Eina.Value("Hallo");
         obj.SetValue("Hallo");
 
@@ -159,9 +170,11 @@ public static class TestEinaValueEolian {
         Test.AssertEquals(s, "Hallo");
 
         // Casting
+        expected.Dispose();
         expected = new Eina.Value((double)15);
         obj.SetValue((double)15);
 
+        received.Dispose();
         obj.OutValue(out received);
         Test.AssertEquals(expected, received);
         Test.AssertEquals(Eina.ValueType.Double, received.GetValueType());
@@ -169,11 +182,16 @@ public static class TestEinaValueEolian {
         // Check for 0
         // This is a special value, since C# can silently convert it to an enum
         // leading to collisions with Eina.ValueType
+        expected.Dispose();
         expected = new Eina.Value(0);
         obj.SetValue(0);
+        received.Dispose();
         obj.OutValue(out received);
         Test.AssertEquals(expected, received);
         Test.AssertEquals(Eina.ValueType.Int32, received.GetValueType());
+        expected.Dispose();
+        received.Dispose();
+        obj.Dispose();
     }
 
 // ValueType in eolian context is beta, so not allowed.
@@ -188,6 +206,7 @@ public static class TestEinaValueEolian {
         {
             Test.AssertEquals(type, obj.MirrorValueType(type));
         }
+        obj.Dispose();
     }
 #endif
 }

-- 


Reply via email to