4 ms·
I'm not sure of your definition of objective here. If you mean a specific implementation and exact version of a specific language does one objective thing that
by nox101 2y ago
I'm not sure of your definition of objective here. If you mean a specific implementation and exact version of a specific language does one objective thing that might be true.
But, different implementations of the same language and different versions of those implementations can all do different things. GC rarely says exactly when something will be collected. Only that it will eventually.
Example: https://jsfiddle.net/8cej4tpk/2/ https://jsfiddle.net/8cej4tpk/2/
Firefox GCs after about 8 seconds, Safari GCs immmediately, Chrome never (probably not until there's pressure). And, you'll find different behavior if you go check different versions of those browsers.
- OutOfHere 2y agoApologies, but the point was that a GC will never unjustly take your memory from you without a well-defined rule. It may delay in taking it away, but if it does, it will be very clear why it did.