Added function for proper destruction of vector of shapes.