Boost logo

Boost Users :

From: Boris (boriss_at_[hidden])
Date: 2008-04-17 07:15:18


I found this in the source code of Boost.Process (which is not an official
Boost library):

// XXX I'm not sure this usage of scoped_ptr is correct...
boost::scoped_ptr< STARTUPINFO > si((STARTUPINFO*)new
char[setup.m_startupinfo->cb]);

I'm not sure either if this is correct. I don't know either why a char
array is allocated and not STARTUPINFO directly. Does anyone know though
if the code above is correct? STARTUPINFO is a POD (see
http://msdn2.microsoft.com/en-us/library/ms686331(VS.85).aspx).

Boris


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