using boost::scoped_ptr to rm the explicit delete call.
sketch the support class ShrinkableVector
sketch the support class ShrinkableVector