added isLeaking flag to mem.js