results of :: https://www.google.ee/search?q=dispose+object+javascript&client=firefox-b&dcr=0&ei=GH_aWbiSAoXPwQK9i4PYDA&start=0&sa=N&biw=1280&bih=915 ________________________________________________________________ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ https://forum.jquery.com/topic/disposing-a-newly-created-object-in-javascript ** ObjCell = new Object(); delete ObjCell; // Create~Dispose new "javascript.PTR" ———————————————————————————————————————————————————————————————— https://stackoverflow.com/questions/742623/deleting-objects-in-javascript ** var x = new Object(); x.y = 42; alert(x.y); // shows '42' delete x; /* no effect */ alert(x.y); // still shows '42' delete x.y; /* deletes the property */ alert(x.y); // shows 'undefined' ———————————————————————————————————————————————————————————————— https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management + https://auth0.com/blog/four-types-of-leaks-in-your-javascript-code-and-how-to-get-rid-of-them/ + https://github.com/dart-lang/sdk/issues/3691 ———————————————————————————————————————————————————————————————— https://gamealchemist.wordpress.com/2013/02/02/no-more-garbage-pooling-objects-built-with-constructor-functions/ ———————————————————————————————————————————————————————————————— javascript Array http://2ality.com/2012/12/clear-array.html https://www.w3schools.com/jsref/jsref_push.asp verus -Obj/-Class https://discourse.threejs.org/t/how-to-properly-dispose-of-a-mesh-and-remove-it-from-a-scene/155 ** Assuming you want to completely remove your mesh (free up all memory), in addition to materials and geometry, you need to dispose the texture maps, the mesh object and the functions associated with it (i.e. animations). if the object is a grouped object, you will need to traverse down the object hierarchy and clean up all individual objects the same way. ———————————————————————————————————————————————————————————————— http://www.html5gamedevs.com/topic/7073-problem-with-disposing-objects/ ** I see you are declaring some vars inside some for scope (Ex: createsegments, showdetails and hidedetails), although the vars had the same name, and the value inside it is in fact substituted, the system will instantiate a new var in memory by each loop. And that consumes a lot of memory, and will keep growing and growing. Can you plz try do declare those vars outside of the loop scopes to see if the problem is relationed with that? ———————————————————————————————————————————————————————————————— https://www.codeproject.com/Articles/35532/C-COM-Object-for-Use-In-JavaScript-HTML-Including ———————————————————————————————————————————————————————————————— https://www.reddit.com/r/javascript/comments/cq0gs/can_i_make_an_object_selfdestruct/ **** RJC(ci139) :: it's likely required to pass the "remnant chunk" of the Obj/PTR being disposed to a "System var"(/to the higher level in scope) which is then deleted in/by_the outside the Obj/PTR scope ... **** ———————————————————————————————————————————————————————————————— ↑↑↑↑ ... just a some of everything you need to know to manage javascript (dynamic)Obj(/PTR) variables "correct" ... ↑↑↑↑ ________________________________________________________________ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ref.list , features.many :: https://coderwall.com/p/qjzbig/understanding-constructor-and-prototype http://sporto.github.io/blog/2013/02/22/a-plain-english-guide-to-javascript-prototypes/ https://www.w3schools.com/js/js_object_definition.asp -- Using an Object Constructor https://www.w3schools.com/js/js_function_definition.asp -- The Function() Constructor https://www.w3schools.com/js/js_operators.asp -- JavaScript Assignment Operators https://stackoverflow.com/questions/2326072/javascript-function-pointer-assignment -- misc. fn=fn ———————————————————————————————————————————————————————————————— ———————————————————————————————————————————————————————————————— [Eof] **