[libgee/0.6] Fix memory leak on freeing LinkedList
- From: Maciej Marcin Piechotka <mpiechotka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgee/0.6] Fix memory leak on freeing LinkedList
- Date: Sat, 20 Nov 2010 01:32:30 +0000 (UTC)
commit 07a8677a2e1c0ba76db1be3df2aa18b5d8336686
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date: Sat Nov 20 01:28:45 2010 +0000
Fix memory leak on freeing LinkedList
If fixes issue described in bug #635224
gee/linkedlist.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gee/linkedlist.vala b/gee/linkedlist.vala
index bf61935..fafecc7 100644
--- a/gee/linkedlist.vala
+++ b/gee/linkedlist.vala
@@ -57,6 +57,11 @@ public class Gee.LinkedList<G> : AbstractList<G>, Queue<G>, Deque<G> {
}
this.equal_func = equal_func;
}
+
+ ~LinkedList () {
+ while (_head != null)
+ _remove_node (_head);
+ }
/**
* { inheritDoc}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]