![]() addEventListener ( 'click', grow ) Įvery time that the button referenced in the code is pressed, ten thousand div nodes are appended to the document body, and a string of one million x characters is pushed onto the x array. To demonstrate Timeline memory recordings, consider the code below: var x = ĭocument. ![]() Click the collect garbage button ( ) while recording to force garbage collection. Tip: It's a good practice to start and end your recording with a forced garbage collection. The Timeline panel helps you visualize a page's memory use over time. You can also use the Timeline panel as another starting point in your investigation. # Visualize memory leaks with Timeline recordings If this number is increasing, either new objects are being created, or the existing objects are growing. The live number represents how much memory the reachable objects on your page are using. ![]() The value you're interested in is the live number (the number in parentheses).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |