diff options
author | Miguel de Icaza <miguel@gnome.org> | 2009-04-08 03:43:19 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2009-04-08 03:43:19 +0400 |
commit | 9171a3ab9c77c3ef5eb687724c2ec7bfb7055b9b (patch) | |
tree | 5510a93fa2e098ebeee67f04ceadf9e4b58cf0af /mcs/class/Mono.Tasklets | |
parent | a50a4f95c03d392bfd034a5070c013e2c3841d42 (diff) |
2009-04-07 Miguel de Icaza <miguel@novell.com>
* Mono.Tasklets/Mono.Tasklets/Continuation.cs: Implement
IDisposable.
svn path=/trunk/mcs/; revision=131266
Diffstat (limited to 'mcs/class/Mono.Tasklets')
-rw-r--r-- | mcs/class/Mono.Tasklets/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/Mono.Tasklets/Mono.Tasklets/Continuation.cs | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mcs/class/Mono.Tasklets/ChangeLog b/mcs/class/Mono.Tasklets/ChangeLog new file mode 100644 index 00000000000..caee883548e --- /dev/null +++ b/mcs/class/Mono.Tasklets/ChangeLog @@ -0,0 +1,5 @@ +2009-04-07 Miguel de Icaza <miguel@novell.com> + + * Mono.Tasklets/Mono.Tasklets/Continuation.cs: Implement + IDisposable. + diff --git a/mcs/class/Mono.Tasklets/Mono.Tasklets/Continuation.cs b/mcs/class/Mono.Tasklets/Mono.Tasklets/Continuation.cs index 006af5f0e0f..a49615eb2d0 100644 --- a/mcs/class/Mono.Tasklets/Mono.Tasklets/Continuation.cs +++ b/mcs/class/Mono.Tasklets/Mono.Tasklets/Continuation.cs @@ -29,7 +29,7 @@ namespace Mono.Tasklets { // we may want to not expose this class at all in the API // and just provide a higher-level API - public class Continuation + public class Continuation : IDisposable { IntPtr cont; @@ -40,7 +40,12 @@ namespace Mono.Tasklets { ~Continuation () { - if (cont != IntPtr.Zero) { + Dispose (); + } + + public void Dispose () + { + if (cont != IntPtr.Zero){ free (cont); cont = IntPtr.Zero; } |