diff src/context.cpp @ 146:7278c9766e26

free old configs when last reference goes away
author carl
date Sun, 15 Oct 2006 17:21:07 -0700
parents 9b9bab1d3c21
children 9330b8d6a56b
line wrap: on
line diff
--- a/src/context.cpp	Sun Oct 15 12:41:46 2006 -0700
+++ b/src/context.cpp	Sun Oct 15 17:21:07 2006 -0700
@@ -395,6 +395,11 @@
 
 
 CONFIG::~CONFIG() {
+	if (debug_syslog) {
+		char buf[maxlen];
+		snprintf(buf, sizeof(buf), "freeing memory for old configuration generation %d", generation);
+		my_syslog(buf);
+	}
 	for (context_list::iterator i=contexts.begin(); i!=contexts.end(); i++) {
 		CONTEXT *c = *i;
 		delete c;