- Added flags to Environment class to fix memory leak when handling temporary env destruction