I have this:
struct Node;
typedef boost::intrusive_ptr<Node> NodeSPtr;
...
boost::scoped_array<NodeSPtr> nodes(new NodeSPtr[size]);
...
// "pollute" operations ...
...
// reset all the items in the array
for (size_t i = 0; i < size; ++i)
nodes[i].reset();
What is the cleanest more STLish way to initialize the array. Note that the code is performance sensitive and using vector is not an option.