deallocates costmap_ before reallocating