# Pastebin nT0Ds9wg console.log("in global - before"); let maxString = buf.toString('latin1', 1); console.log("in global - after"); assert.strictEqual(maxString.length, kStringMaxLength); // Free the memory early instead of at the end of the next assignment maxString = undefined; console.log("in global - before slice"); maxString = buf.toString('latin1', 0, kStringMaxLength); console.log("in global - after slice"); assert.strictEqual(maxString.length, kStringMaxLength);