What is JavaScript garbage collection? What's important for a web programmer to understand about JavaScript garbage collection, in order to write better code?...
I'm a bit confused with JavaScript's delete operator. Take the following piece of code:  var obj = {     helloText: "Hello World!" };  var foo = obj;  delete obj;   After this piece of code has been executed, obj is null, but foo st...
I've logged the following Chrome bug, which has led to many serious and non-obvious memory leaks in my code:  (These results use Chrome Dev Tools' memory profiler, which runs the GC, and then takes a heap snapshot of everything not garbaged...
Is there any way to control when Javascript performs garbage collection? I would like to enable it to perform garbage collection at certain times to ensure the smooth operation of my web site...
We are developing a single-page web app with ZK which constantly communicates with server and updates parts of its screens. Updating can be as frequent as 1s. During these updates, references to large ammounts of JS objects are lost and those objec...
This is mostly an out-of-curiosity question.  Consider the following functions  var closure ; function f0() {     var x = new BigObject() ;     var y = 0 ;     closure = function(){ return 7; } ; } function f1() {     var x = BigObject() ;     clos...
I know that Javascript has a garbage collector. Therefor, using delete remove only a reference to the object, and when there is no more reference to this object, it is deleted by the GC.  Javascript is tricky, with the closures, the fuzzy name space...
I've come up with  function keysToLowerCase (obj) {   var keys = Object.keys(obj);   var n = keys.length;   while (n--) {     var key = keys[n]; // "cache" it, for less lookups to the array     if (key !== key.toLowerCase()) { // might al...
How to get reference count for an object   Is it possible to determine if a javascript object has multiple references to it?  Or if it has references besides the one I'm accessing it with?  Or even just to get the reference count itself? Can I fi...
In JavaScript memory that I allocated (e.g. an ArrayBuffer) gets freed up when I don't have any reference to it anymore by the GC as I understood that right?  WebGL objects like Buffers or Textures are associated with a memory block on the GPU as...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.