reduce memory by deleting result of inactive vertices