[libgee] Fix memory leak on freeing LinkedList



commit 70d79e77860c29856535001441686510d653abc8
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 842e1c7..76dc808 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]