Fix build failure for debug mode, changes dynamic allocation to std:;vector dynamic allocation fir reduce