You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Yes, absolutely. Potentially a module is slightly worse as nothing in it can get freed in case the module is used again. If you did something like:

    function onInit() {
      myBigFunction();
      delete myBigFunction;
    }
    

    you could explicitly remove the function. You could actually do delete require("myModule").bigFunction too, but it's pretty nasty :)

About

Avatar for Gordon @Gordon started