#3961 closed Bugs (invalid)
Memory leak on boost::posix_time::operator<<
Reported by: | Owned by: | az_sw_dude | |
---|---|---|---|
Milestone: | Component: | date_time | |
Version: | Boost 1.41.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Valgrind reports a memory leak when streaming a boost::posix_time::ptime object. Attached both a sample main file, and the valgrind report.
This occours both on gentoo linux with boost 1.41 and gcc 4.3.4 and on ubuntu with boost 1.73 and gcc 4.3.3
Attachments (2)
Change History (4)
by , 13 years ago
Attachment: | memory_leak.cpp added |
---|
by , 13 years ago
Attachment: | valgrind_log added |
---|
comment:1 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 5 years ago
Why can't os.imbue(std::locale::classic()); be added at the end of the function to fix the "potential leak"?
Note:
See TracTickets
for help on using tickets.
I see no bug here. The facet is intended to be deleted by the locale (according to 22.1.1.1.2/2). I suspect that valgrind flags this as a leak since the locale of std::cout is never destroyed.