Click the "Run Test" button to run the following code

You can open DevTools to see the memory leak

    
        let create_leak_class = () => {

            function Leak() {
        
                //call an unused prototype method
                this.unused();
        
            }
        
            Leak.prototype.unused = () => {
        
                //do nothing
            };
        
            return Leak;
        
        }
        
        let loadTest = () => {
        
            let Leak = create_leak_class();
            let test = new Leak();
        };
        
        while (true) {
        
            loadTest();
        
        }