browser refresh does not do garbage collection

后端 未结 1 1425
花落未央
花落未央 2021-02-14 14:52

I have found this on all browsers tested - IE, Firefox, Chrome and Safari on Window sand Safari on Apple.

Allegedly, a browser refresh, back button or forward link shoul

1条回答
  •  闹比i
    闹比i (楼主)
    2021-02-14 15:05

    One of the points with garbage collection is that the objects are not cleaned up immediately they get unused. The garbage collector can determine for iteself when it's most convenient to do collections.

    It's normal for a garbage collected system to leave some unused objects in the heap, as long as there is plenty of memory to use. A computer doesn't run any faster from having a lot of unused memory.

    0 讨论(0)
提交回复
热议问题