[Swift-commit] cog r3966

swift at ci.uchicago.edu swift at ci.uchicago.edu
Tue Jun 24 23:05:03 CDT 2014


------------------------------------------------------------------------
r3966 | timgarmstrong | 2014-06-24 23:02:21 -0500 (Tue, 24 Jun 2014) | 1 line

Note on remaining memory leak
------------------------------------------------------------------------
Index: modules/provider-coaster-c-client/src/CoasterChannel.cpp
===================================================================
--- modules/provider-coaster-c-client/src/CoasterChannel.cpp	(revision 3965)
+++ modules/provider-coaster-c-client/src/CoasterChannel.cpp	(working copy)
@@ -54,10 +54,10 @@
 
 CoasterChannel::~CoasterChannel() {
 	delete rhdr.buf;
-        for (map<int, Handler*>::iterator it = handlers.begin();
-             it != handlers.end(); ++it) {
-        	delete it->second;
-        }
+	for (map<int, Handler*>::iterator it = handlers.begin();
+	     it != handlers.end(); ++it) {
+		delete it->second;
+	}
 
 }
 
@@ -86,6 +86,7 @@
 				// full header read
 				msg.reset();
 				decodeHeader(&rtag, &rflags, &rlen);
+				// TODO: this is being leaked
 				msg.buf = new DynamicBuffer(rlen);
 				readState = READ_STATE_DATA;
 			}



More information about the Swift-commit mailing list