add close in addVector and cancel my wrong previous commit