web analytics
Home » Technology » Microsoft » Microsoft Edge New Tool Detects Memory Leaks

Microsoft Edge New Tool Detects Memory Leaks

Edge

Microsoft has integrated another developer tool into the Chromium-based Edge browser. Edge 97 has the ability to inspect a page for memory leaks. With this, the Redmond-based company would like to counteract the high memory usage of some websites.

Memory leaks occur when a program occupies the main memory but does not subsequently use or release the reserved areas. In many cases, errors in memory management can result in using up all of a computer’s RAM. The application that caused it must then be closed to prevent further apps from crashing. In some cases, the entire system has to be restarted.

Developers often struggle to pinpoint the source of memory leaks and fix the bugs. For this reason, Microsoft has built a new tool in Edge. As the Redmond-based company wrote in a blog entry, the tool is called “Detached Elements” and displays a list of objects that are in memory but no longer in the Document Object Model (DOM). Not every object detached from the DOM causes a memory leak. Twitter removes some tweets from the DOM while scrolling and adds them back when the user scrolls in the other direction.

Memory Can Be Increased

Detached items create problems if they are reserved in memory and not reused. Even if these are only small objects, the amount of memory used can increase sharply with long-running scripts. With the new tool, developers can see which objects that are no longer displayed on the page remain in memory. Then a decision can be made as to whether the behavior is intended or not. Microsoft has made a demo app available on GitHub.