ECMAScript 6 class destructor
Is there such a thing as destructors for ECMAScript 6? No. EcmaScript 6 does not specify any garbage collection semantics at all[1], so there is nothing like a “destruction” either. If I register some of my object’s methods as event listeners in the constructor, I want to remove them when my object is deleted A … Read more