Strange use of boost::scoped_ptr in Boost.Process

17 Apr
2008
17 Apr
'08
11:15 a.m.
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
6155
Age (days ago)
6155
Last active (days ago)
0 comments
1 participants
participants (1)
-
Boris