What's the problem with adding new Date () to the array and memory can't be reclaimed?

Happy New year, everyone. How many codes do you want to eat?

setTimeout(test2, 3000)
function test2 () {
  var leak = []
  for (var i = 0; i < 2000000; iPP) {
    leak.push(new Date())
  } //  IE  267M test1  null 
  leak = null //  null 
}

setTimeout(test3, 3000)
function test3 () {
  var leak = []
  for (var i = 0; i < 10000000; iPP) { // 
    leak.push(" new Date() ")
  } //  IE  40M  push  124M 41.7M
}

setTimeout(test4, 3000)
function test4 () {
  for (var i = 0; i < 10000000; iPP) {
    var a = new Date()
  } //  40~50M  new Date() 
}
Jun.08,2022

still works

it is better to wait for 40 10s

then compare the code with the comment leak = null
to observe the change in waiting time (maybe there is a change, I don't know, you can hang up all afternoon to see if the memory has been reduced (compressed?) )

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b73a-2a7dd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b73a-2a7dd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?