Revert "memory leak fix"

This reverts commit 938d1627bc60ba1e5510c12fb310d595d233d839.