summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-04-05 13:12:51 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2018-04-05 13:16:45 +0200
commitcc4603a2b5d9e6f36d196432042f6f0048dd5d89 (patch)
treef25093022c0dca2ed241fc1a75f39b7a8991141f
parent3cf082f10692ab8fd75a0a59dfa6a97b77a39bd6 (diff)
downloadzeitgeist-cc4603a2b5d9e6f36d196432042f6f0048dd5d89.tar.gz
ontology: Avoid ownership mismatches of container elements to fix memleak
-rw-r--r--libzeitgeist/ontology.vala.in10
1 files changed, 5 insertions, 5 deletions
diff --git a/libzeitgeist/ontology.vala.in b/libzeitgeist/ontology.vala.in
index 63171701..768fd005 100644
--- a/libzeitgeist/ontology.vala.in
+++ b/libzeitgeist/ontology.vala.in
@@ -56,7 +56,7 @@ namespace Zeitgeist
{
initialize_symbols ();
- var results = new List<string> ();
+ var results = new List<unowned string> ();
var symbol = all_symbols.lookup (symbol_uri);
if (symbol == null) return results;
@@ -64,7 +64,7 @@ namespace Zeitgeist
{
results.append (uri);
// Recursively get the other parents
- foreach (string parent_uri in get_all_parents (uri))
+ foreach (unowned string parent_uri in get_all_parents (uri))
if (results.index (parent_uri) == -1)
results.append (parent_uri);
}
@@ -76,7 +76,7 @@ namespace Zeitgeist
{
initialize_symbols ();
- var results = new List<string> ();
+ var results = new List<unowned string> ();
var symbol = all_symbols.lookup (symbol_uri);
if (symbol == null) return results;
@@ -89,7 +89,7 @@ namespace Zeitgeist
public static List<unowned string> get_children (string symbol_uri)
{
initialize_symbols ();
- var results = new List<string> ();
+ var results = new List<unowned string> ();
var symbol = all_symbols.lookup (symbol_uri);
if (symbol == null) return results;
@@ -103,7 +103,7 @@ namespace Zeitgeist
{
initialize_symbols ();
- var results = new List<string>();
+ var results = new List<unowned string>();
var symbol = all_symbols.lookup (symbol_uri);
if (symbol == null) return results;