diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-13 18:05:30 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-08-13 18:05:30 +0000 |
commit | e788bbaa89ad9aa5a0cd56b5a705996c040b0090 (patch) | |
tree | eddc7fbce7815d4edf8e6dcff43f7a1c1b9e268c /crawl-ref/source/message.cc | |
parent | 7f8610e3e3c52cdcc3b2c4ee7b4c213534ab6310 (diff) | |
download | crawl-ref-e788bbaa89ad9aa5a0cd56b5a705996c040b0090.tar.gz crawl-ref-e788bbaa89ad9aa5a0cd56b5a705996c040b0090.zip |
Silenced some valgrind warning noises.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1997 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r-- | crawl-ref/source/message.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc index c615c6e3af..f7bc4bda04 100644 --- a/crawl-ref/source/message.cc +++ b/crawl-ref/source/message.cc @@ -51,6 +51,7 @@ namespace msg { std::ostream stream(new mpr_stream_buf(MSGCH_PLAIN)); std::vector<std::ostream*> stream_ptrs; + std::vector<mpr_stream_buf*> stream_buffers; std::ostream& streams(msg_channel_type chan) { @@ -68,6 +69,7 @@ namespace msg std::ostream* pos = new std::ostream(pmsb); (*pos) << std::nounitbuf; stream_ptrs.push_back(pos); + stream_buffers.push_back(pmsb); } stream << std::nounitbuf; } @@ -76,6 +78,10 @@ namespace msg { for (unsigned int i = 0; i < stream_ptrs.size(); ++i) delete stream_ptrs[i]; + stream_ptrs.clear(); + for (unsigned int i = 0; i < stream_buffers.size(); ++i) + delete stream_buffers[i]; + stream_buffers.clear(); } |