[tracker/tracker-0.8] SPARQL: Fix memory leak due to reference cycle



commit 153d03436d63071f49dfbf4d6745edbf6ea6431b
Author: Jürg Billeter <j bitron ch>
Date:   Fri Apr 2 01:50:51 2010 +0200

    SPARQL: Fix memory leak due to reference cycle

 src/libtracker-data/tracker-sparql-expression.vala |    2 +-
 src/libtracker-data/tracker-sparql-pattern.vala    |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-expression.vala b/src/libtracker-data/tracker-sparql-expression.vala
index 0f83f0d..37a2fea 100644
--- a/src/libtracker-data/tracker-sparql-expression.vala
+++ b/src/libtracker-data/tracker-sparql-expression.vala
@@ -18,7 +18,7 @@
  */
 
 class Tracker.Sparql.Expression : Object {
-	Query query;
+	weak Query query;
 
 	const string XSD_NS = "http://www.w3.org/2001/XMLSchema#";;
 	const string FN_NS = "http://www.w3.org/2005/xpath-functions#";;
diff --git a/src/libtracker-data/tracker-sparql-pattern.vala b/src/libtracker-data/tracker-sparql-pattern.vala
index 364573c..7cea75b 100644
--- a/src/libtracker-data/tracker-sparql-pattern.vala
+++ b/src/libtracker-data/tracker-sparql-pattern.vala
@@ -142,8 +142,8 @@ namespace Tracker.Sparql {
 }
 
 class Tracker.Sparql.Pattern : Object {
-	Query query;
-	Expression expression;
+	weak Query query;
+	weak Expression expression;
 
 	int counter;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]