Revert "closed possible memory leak"

This reverts commit 5633d2804067060f7eede0eae49095979b603fab.