Boost logo

Boost Users :

From: Stewart Loving-Gibbard (sloving-gibbard_at_[hidden])
Date: 2006-02-22 23:18:53


We have observed leaky behavior while using the Boost.date-time
libraries, with time_from_string specifically. The leak is simple to
replicate for us, on both Win32 (Visual Studio .NET 2005) and on Linux
(GCC 3.x).

This code snippet leaks for us, at a rate of about a MB every 10 seconds:

while (true)
{
    time_from_string("2002-01-20 23:59:59");
}

As far as I can tell, ptime (what time_from_string returns) is an object
that doesn't need to be deallocated with a Boost API function. So, why
are we leaking here? Did we compile Boost incorrectly? Is there a way to
link Boost that can trigger a leak?

(from_iso_string() also appears to leak for us, by the way, while
to_iso_string does not. It looks like time_from_string and to_iso_string
are in the same neighborhood, so I'm betting they share the same fix.)

Any and all help appreciated. This is a blocking issue for us.

Stewart


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net