summaryrefslogtreecommitdiffstats
path: root/sord/sordmm.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-02-18 17:48:58 +0000
committerDavid Robillard <d@drobilla.net>2013-02-18 17:48:58 +0000
commit131f6f4456a639fed721df603f0e0c722adc8e91 (patch)
tree0201fda485055a90cdf1c89c8d0e8c551dd13b6c /sord/sordmm.hpp
parent1f7c6726ab0ed34bdb4b25884b396563fab05b99 (diff)
downloadsord-131f6f4456a639fed721df603f0e0c722adc8e91.tar.gz
sord-131f6f4456a639fed721df603f0e0c722adc8e91.tar.bz2
sord-131f6f4456a639fed721df603f0e0c722adc8e91.zip
Fix reference counting semantics of sord_get().
git-svn-id: http://svn.drobilla.net/sord/trunk@286 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'sord/sordmm.hpp')
-rw-r--r--sord/sordmm.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/sord/sordmm.hpp b/sord/sordmm.hpp
index 4e6585f..b98afc7 100644
--- a/sord/sordmm.hpp
+++ b/sord/sordmm.hpp
@@ -640,11 +640,11 @@ Model::get(const Node& subject,
const Node& predicate,
const Node& object)
{
- return Node(_world, sord_get(_c_obj,
- subject.c_obj(),
- predicate.c_obj(),
- object.c_obj(),
- NULL));
+ SordNode* c_node = sord_get(
+ _c_obj, subject.c_obj(), predicate.c_obj(), object.c_obj(), NULL);
+ Node node(_world, c_node);
+ sord_node_free(_world.c_obj(), c_node);
+ return node;
}
} // namespace Sord