From d066490a1ee302059731d3884dbbe2bae9d7173a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 16 Oct 2009 15:56:12 +0000 Subject: Fix memory leaks. git-svn-id: http://svn.drobilla.net/resp/tuplr@243 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/tuplr.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tuplr.hpp') diff --git a/src/tuplr.hpp b/src/tuplr.hpp index 0385533..787355b 100644 --- a/src/tuplr.hpp +++ b/src/tuplr.hpp @@ -158,7 +158,7 @@ struct Object { inline Tag tag() const { return (Tag)header()->tag; } inline void tag(Tag t) { header()->tag = t; } inline bool marked() const { return header()->mark != 0; } - inline void mark(bool b) const { header()->mark = 1; } + inline void mark(bool b) const { header()->mark = (b ? 1 : 0); } static void* operator new(size_t size) { return pool.alloc(size); } static void operator delete(void* ptr) {} @@ -638,6 +638,8 @@ Subst unify(const Constraints& c); /// Compiler backend struct Engine { + virtual ~Engine() {} + virtual CFunc startFunction( CEnv& cenv, const std::string& name, -- cgit v1.2.1