Fixed memory leaks
Revert "Fixed memory leaks"

This reverts commit 0940e54ffc73fc470772228f219750727375c384.