Any idea on garbage collector timer in javascript? Suppose i run below script, will function and associated scope chained variable will go for garbage collection exactly after 100ms? Or some margin?
I read one thread about garbage collection in stackoverflow, still i have this question. Below are my questions?
- Does any SYSTEM TIMER run for garbage collection task?
If no, is it EVENT based?, means if reference is no more present, garbage collector will reclaim memory INSTANTLY.
function call_me() { //calculate elapsed_time - code not given if(elapsed_time <100) { setTimeout(call_me,25); } else{ final_call(); } } call_me();