date _facet segmentation fault
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
Found a similar question on Stack Overflow: http://stackoverflow.com/questions/5330459/ownership-deleteing-the-facet-in-... So, the facet is properly destroyed.
On 2011-08-04 01:53:09 +0200, Ignacio Burgueño said:
Found a similar question on Stack Overflow:
http://stackoverflow.com/questions/5330459/ownership-deleteing-the-facet-in-...
So, the facet is properly destroyed.
Thanks a lot for the link. It seems that the object will be destroyed Phil
participants (3)
-
Ignacio Burgueño
-
Kraus Philipp
-
Philipp Kraus