Created
December 3, 2019 11:20
-
-
Save kring/5aaf3599a391bd74e3a6267b4ee55755 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const longLived = new LongLived(); | |
let sum = 0; | |
for (let i = 0; i < 100; ++i) { | |
const shortLived = new ShortLived(longLived); | |
sum += shortLived.bar; | |
shortLived.dispose(); | |
} | |
console.log(sum); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment