Fixes some USE_AFTER_FREE
Merge pull request #64 from Hamcha/feature/HOT_TREES

Fixes some USE_AFTER_FREE