Snippets Collections
# A memory leak can occur in your application when an element is no longer attached to the Document Object Model (DOM) tree, but is still referenced by some JavaScript running on the page. These elements are called detached elements.
[https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/memory-problems/dom-leaks]
 
 
 a reference to an object will prevent the object referenced from being garbage collected.
 [https://developer.chrome.com/docs/devtools/memory-problems/memory-101/]
 
 
 # window leaks
 variables set on the window do not get collected
 - windwo.myvar = 'whatever'
 [https://medium.com/coding-blocks/catching-memory-leaks-with-chrome-devtools-57b03acb6bb9]
    override func viewDidAppear(_ animated: Bool) {
        
        self.profileImageView.frame.size = CGSize(width: self.profileImageView.frame.height,
                                                  height: self.profileImageView.frame.height)
        self.profileImageView.center.x = self.view.center.x
    }

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension