Hello,

I use this little code for formating a date value:

std::stringstream l_stream;

boost::gregorian::date_facet* l_format = new boost::gregorian::date_facet();
l_format->format("%Y-%m-%d");

l_stream.imbue(std::locale(std::locale::classic(), l_format)); 

If I call after the imbue a delete (delte l_format) to remove the date_facet from the heap
the program creates a segmentation fault value.

Does the std::stringstream remove the date_facet object from the heap? If not, how can I 
do a correct clear of the object? I hope, that question is not off topic.
I would like to format a date value in a stringstream

Thanks alot

Phil