id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9181,memory leak in Date_Time,gregory@…,az_sw_dude,"It looks like there is a memory leak when streaming Date_Time objects to standard output. Consider the following simple code: #include #include using namespace boost::posix_time; int main() { ptime time(boost::gregorian::date(2013, 9, 30), hours(14) + minutes(42)); std::cout << time << '\n'; std::cout << time.date() << '\n'; std::cout << time.date().month() << '\n'; std::cout << time.time_of_day() << '\n'; } Compiling: g++ -lboost_date_time bug.cpp Testing: valgrind ./a.out ==8994== Memcheck, a memory error detector ==8994== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==8994== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==8994== Command: ./a.out ==8994== 2013-Sep-30 14:42:00 2013-Sep-30 Sep 14:42:00 ==8994== ==8994== HEAP SUMMARY: ==8994== in use at exit: 2,491 bytes in 49 blocks ==8994== total heap usage: 82 allocs, 33 frees, 8,448 bytes allocated ==8994== ==8994== LEAK SUMMARY: ==8994== definitely lost: 0 bytes in 0 blocks ==8994== indirectly lost: 0 bytes in 0 blocks ==8994== possibly lost: 1,187 bytes in 39 blocks ==8994== still reachable: 1,304 bytes in 10 blocks ==8994== suppressed: 0 bytes in 0 blocks ==8994== Rerun with --leak-check=full to see details of leaked memory ==8994== ==8994== For counts of detected and suppressed errors, rerun with: -v ==8994== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2) (please find the --leak-check=full output attached). I'm using Ubuntu 12.04 LTS, Boost 1.48.0-3, and gcc 4.6.3.",Bugs,closed,To Be Determined,date_time,Boost 1.48.0,Problem,invalid,Date_Time memory leak,mail@…