diff options
author | David Robillard <d@drobilla.net> | 2009-06-19 03:11:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-19 03:11:33 +0000 |
commit | 855456a9d98c5c27bb2b00bab4018630598117fa (patch) | |
tree | 8c13f757d5439558cba32eb0db050d76788b7a92 /tuplr.cpp | |
parent | 450137a8283cdc123b22a884d6af7fef2f3aae76 (diff) | |
download | resp-855456a9d98c5c27bb2b00bab4018630598117fa.tar.gz resp-855456a9d98c5c27bb2b00bab4018630598117fa.tar.bz2 resp-855456a9d98c5c27bb2b00bab4018630598117fa.zip |
Primitive garbage collector for AST nodes.
Fix memory leaks.
git-svn-id: http://svn.drobilla.net/resp/tuplr@123 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'tuplr.cpp')
-rw-r--r-- | tuplr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -27,6 +27,7 @@ using namespace std; using boost::format; Funcs AConsCall::funcs; +GC AST::pool; template<typename Atom> ostream& @@ -228,6 +229,7 @@ initLang(PEnv& penv, TEnv& tenv) } + /*************************************************************************** * EVAL/REPL/MAIN * ***************************************************************************/ @@ -256,6 +258,7 @@ main(int argc, char** argv) CEnv* cenv = newCenv(penv, tenv); cenv->push(); + AST::pool.lock(); map<string,string> args; list<string> files; @@ -326,7 +329,7 @@ main(int argc, char** argv) os.close(); } - delete cenv; + freeCenv(cenv); return ret; } |