Removed mem leak detection code