While you built object inheritance (linked prototypes), I don't think the browser relies on your links to this object.
ex1:
var a = function(){}; a.prototype.toString = function(){return "I'm an A!";}; var b = new a(); a = undefined; var c = new a();
ex2:
var a = function(){}; a.prototype.toString = function(){return "I'm an A!";}; var b = function(){}; b.prototype = new a(); a = undefined; var c = new b(); console.log(c+'');
UPDATE: This behavior may be due to the fact that in javascript you cannot precisely destroy the object; You can remove all links to it. After that, the browser decides how to handle it without objects Garbage collector .
gion_13
source share