TODO: improve logic of vector__cleanup()

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>