有泄露
let map = new Map() let key = new Array(5 * 1024 * 1024) map.set(key, 'is key') key = null console.log('map', map)
无泄露
let map2 = new Map() let key2 = new Array(5 * 1024 * 1024) map2.set(key2, 'is key') map2.delete(key2) key2 = null console.log('map2', map2)