summaryrefslogtreecommitdiff
path: root/src/compiler.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2016-03-16 16:41:29 +0100
committerAdrian Thurston <thurston@complang.org>2016-03-16 16:41:29 +0100
commitb0ec721d644d5f333048c7ccfbb0259cf0c27dbb (patch)
treeb56f7fe271f13821fc091dc43ef3ed79e7c865fd /src/compiler.cc
parentc64d1d965b47cac4376e5968b5dd88004a2e1a5d (diff)
downloadcolm-b0ec721d644d5f333048c7ccfbb0259cf0c27dbb.tar.gz
extract stream file names so we can use them after the colm program is deleted
Diffstat (limited to 'src/compiler.cc')
-rw-r--r--src/compiler.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler.cc b/src/compiler.cc
index 3020d7f5..808c6e95 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -415,6 +415,15 @@ Compiler::~Compiler()
/* Delete all the nodes in the action list. Will cause all the
* string data that represents the actions to be deallocated. */
actionList.empty();
+
+ for ( CharVectVect::Iter fns = streamFileNames; fns.lte(); fns++ ) {
+ const char **ptr = *fns;
+ while ( *ptr != 0 ) {
+ ::free( (void*)*ptr );
+ ptr += 1;
+ }
+ free( (void*) *fns );
+ }
}
ostream &operator<<( ostream &out, const Token &token )