Created
January 14, 2025 20:07
-
-
Save Fasteroid/911a72ace084fa495e5b193b2f4f9e09 to your computer and use it in GitHub Desktop.
Memory leak via improper use of FinalizationRegistry
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
( () => { | |
let custodian = new FinalizationRegistry((x) => console.log(x)) | |
let leak = {haha: "funni"} | |
custodian.register(leak, {leak}) | |
} )() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It should go without saying, but like, don't do this.