[HN Gopher] MemLab: An open source framework for finding JavaScr...
       ___________________________________________________________________
        
       MemLab: An open source framework for finding JavaScript memory
       leaks
        
       Author : mikece
       Score  : 86 points
       Date   : 2022-09-12 16:36 UTC (1 days ago)
        
 (HTM) web link (engineering.fb.com)
 (TXT) w3m dump (engineering.fb.com)
        
       | maxloh wrote:
       | If there is any memory leaks in a garbage-collected language,
       | isn't it a bug of V8 instead?
        
         | astrange wrote:
         | You can just leak memory by leaving references to it around.
         | Sometimes called memory abandonment.
         | 
         | With some systems you can pin it and forget to unpin it.
        
       | latchkey wrote:
       | Memory leak because of console.log? Wow, news to me. Not that I
       | really ever use it for much since I believe in writing unit tests
       | over outputting logs to the console. But I can see how others
       | might get bitten by this for sure.
        
         | chess_buster wrote:
         | Can confirm, have been bitten in production. Therefore we have
         | a lint rule that disallows `console.log` for production builds.
        
       | jalino23 wrote:
       | its incredibly difficult to debug memory leak even with dev
       | tools, I will look into this and hope it helps
        
         | Frotag wrote:
         | I learned recently that Edge has a "Detached Elements" panel
         | that identifies leaked DOM elements and the code / object
         | holding the reference.
         | 
         | It basically automates the process of diff'ing heap snapshots.
        
       | emptysea wrote:
       | Ah I think this was mentioned in a comment on a previous thread:
       | 
       | https://news.ycombinator.com/item?id=29595441
       | 
       | Glad to see it finally open sourced!
        
         | lgong wrote:
         | Yup, that's the previous thread :)
        
       ___________________________________________________________________
       (page generated 2022-09-13 23:01 UTC)