CkIO test: don't leak messages
authorPhil Miller <mille121@illinois.edu>
Thu, 8 Aug 2013 15:57:35 +0000 (10:57 -0500)
committerPhil Miller <mille121@illinois.edu>
Tue, 20 Aug 2013 23:29:09 +0000 (18:29 -0500)
tests/charm++/io/iotest.C
tests/charm++/io/iotest.ci

index 78286dbe6cbaa7f2e927240bdf5ea66aca017021..042d92a3716fdc25a413753e8136bb7642a65c79 100644 (file)
@@ -17,6 +17,7 @@ public:
       thisProxy.run(4*i);
 
     CkPrintf("Main ran\n");
+    delete m;
   }
 
   void iterDone() {
index 7b69626eed114d7bebd640c748160b57d570d051..ebff9a5d8b82eadf7ec4a58eec2fc10965af188a 100644 (file)
@@ -29,9 +29,11 @@ mainmodule iotest {
       when start_write[iter + 1](Ck::IO::SessionReadyMsg *m) serial {
         testers = CProxy_test::ckNew(m->session, n);
         CkPrintf("Main saw session ready\n");
+        delete m;
       }
       when test_written[iter + 2](CkReductionMsg *m) serial {
         CkPrintf("Main saw write done\n");
+        delete m;
         // Read file and validate contents
         CkCallback cb(CkIndex_Main::closed(0), thisProxy);
         cb.setRefnum(iter + 3);
@@ -39,6 +41,7 @@ mainmodule iotest {
       }
       when closed[iter + 3](CkReductionMsg *m) serial {
         CkPrintf("Main saw close done\n");
+        delete m;
         thisProxy.iterDone();
       }
     };