Boost logo

Boost :

From: Alo Sarv (alo.sarv_at_[hidden])
Date: 2006-02-16 14:56:06


The following test app illustrates a memory leak that I'v been able to
produce so far with MSVC 8.0 (earlier versions not tested). GCC 4.0
seems to be unaffected. The leakage in case of this test app is around
12kb/s.

#include <iostream>
#include <boost/date_time/posix_time/posix_time.hpp>
using namespace boost::posix_time;
int main(int argc, char *argv[]) {
  ptime t(second_clock::local_time());
  while (true) {
    std::cout << t << "\r";
  }
  return 0;
}

Tested against Boost 1.33.1 release.

Compiled with
cl test.cpp /I c:\boost_1_33_1 /D _CRT_SECURE_NO_DEPRECATE /EHsc /D
BOOST_ALL_NO_LIB

--
Alo Sarv

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk