Enviar pesquisa
Carregar
Memory Leak in JavaScript: Understanding and Avoiding Common Causes
•
0 gostou
•
77 visualizações
Título melhorado com IA
Tchelinux
Seguir
Memory leak in Javascript - Renan Bastos Tchelinux 2018 Porto Alegre
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 14
Baixar agora
Baixar para ler offline
Recomendados
Full-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.js
Michael Lehmann
Devcast node.js e mongo db o casamento perfeito
Devcast node.js e mongo db o casamento perfeito
Suissa
Bs webgl소모임004
Bs webgl소모임004
Seonki Paik
ネイティブ開発アンチパターン
ネイティブ開発アンチパターン
Yuki Tamura
Snow
Snow
Desarrollo Regional de la Educación
Node day 2014
Node day 2014
Trevor Norris
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovy
Yasuharu Nakano
What they don't tell you about JavaScript
What they don't tell you about JavaScript
Raphael Cruzeiro
Recomendados
Full-Stack JavaScript with Node.js
Full-Stack JavaScript with Node.js
Michael Lehmann
Devcast node.js e mongo db o casamento perfeito
Devcast node.js e mongo db o casamento perfeito
Suissa
Bs webgl소모임004
Bs webgl소모임004
Seonki Paik
ネイティブ開発アンチパターン
ネイティブ開発アンチパターン
Yuki Tamura
Snow
Snow
Desarrollo Regional de la Educación
Node day 2014
Node day 2014
Trevor Norris
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovy
Yasuharu Nakano
What they don't tell you about JavaScript
What they don't tell you about JavaScript
Raphael Cruzeiro
Java data structures powered by Redis. Introduction to Redisson @ Redis Light...
Java data structures powered by Redis. Introduction to Redisson @ Redis Light...
Nikita Koksharov
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.js
Mike Hagedorn
Redis the better NoSQL
Redis the better NoSQL
OpenFest team
MongoDB
MongoDB
hyun soomyung
サイ本 文
サイ本 文
Takashi Takizawa
The State of JavaScript
The State of JavaScript
Domenic Denicola
RedisConf17 - Distributed Java Map Structures and Services with Redisson
RedisConf17 - Distributed Java Map Structures and Services with Redisson
Redis Labs
The jsdom
The jsdom
Domenic Denicola
W3C HTML5 KIG-How to write low garbage real-time javascript
W3C HTML5 KIG-How to write low garbage real-time javascript
Changhwan Yi
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
rivierarb
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Arian Gutierrez
clonehd01
clonehd01
Luiz Francisco Bozo
Event Loop in Javascript
Event Loop in Javascript
DiptiGandhi4
The State of JavaScript (2015)
The State of JavaScript (2015)
Domenic Denicola
Orm
Orm
Cosmin Poieana
C SQLite usage
C SQLite usage
Chien-Wei Huang
Make the prompt great again
Make the prompt great again
jtyr
JavaScript - Agora nervoso
JavaScript - Agora nervoso
Luis Vendrame
RxJS 5 in Depth
RxJS 5 in Depth
C4Media
Openstack taskflow 簡介
Openstack taskflow 簡介
kao kuo-tung
What's New in JavaScript
What's New in JavaScript
Dan Cohn
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
Visual Engineering
Mais conteúdo relacionado
Mais procurados
Java data structures powered by Redis. Introduction to Redisson @ Redis Light...
Java data structures powered by Redis. Introduction to Redisson @ Redis Light...
Nikita Koksharov
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.js
Mike Hagedorn
Redis the better NoSQL
Redis the better NoSQL
OpenFest team
MongoDB
MongoDB
hyun soomyung
サイ本 文
サイ本 文
Takashi Takizawa
The State of JavaScript
The State of JavaScript
Domenic Denicola
RedisConf17 - Distributed Java Map Structures and Services with Redisson
RedisConf17 - Distributed Java Map Structures and Services with Redisson
Redis Labs
The jsdom
The jsdom
Domenic Denicola
W3C HTML5 KIG-How to write low garbage real-time javascript
W3C HTML5 KIG-How to write low garbage real-time javascript
Changhwan Yi
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
rivierarb
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Arian Gutierrez
clonehd01
clonehd01
Luiz Francisco Bozo
Event Loop in Javascript
Event Loop in Javascript
DiptiGandhi4
The State of JavaScript (2015)
The State of JavaScript (2015)
Domenic Denicola
Orm
Orm
Cosmin Poieana
C SQLite usage
C SQLite usage
Chien-Wei Huang
Make the prompt great again
Make the prompt great again
jtyr
JavaScript - Agora nervoso
JavaScript - Agora nervoso
Luis Vendrame
RxJS 5 in Depth
RxJS 5 in Depth
C4Media
Openstack taskflow 簡介
Openstack taskflow 簡介
kao kuo-tung
Mais procurados
(20)
Java data structures powered by Redis. Introduction to Redisson @ Redis Light...
Java data structures powered by Redis. Introduction to Redisson @ Redis Light...
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.js
Redis the better NoSQL
Redis the better NoSQL
MongoDB
MongoDB
サイ本 文
サイ本 文
The State of JavaScript
The State of JavaScript
RedisConf17 - Distributed Java Map Structures and Services with Redisson
RedisConf17 - Distributed Java Map Structures and Services with Redisson
The jsdom
The jsdom
W3C HTML5 KIG-How to write low garbage real-time javascript
W3C HTML5 KIG-How to write low garbage real-time javascript
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
Ruby 2.0 at the Ruby drink-up of Sophia, February 2013
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
clonehd01
clonehd01
Event Loop in Javascript
Event Loop in Javascript
The State of JavaScript (2015)
The State of JavaScript (2015)
Orm
Orm
C SQLite usage
C SQLite usage
Make the prompt great again
Make the prompt great again
JavaScript - Agora nervoso
JavaScript - Agora nervoso
RxJS 5 in Depth
RxJS 5 in Depth
Openstack taskflow 簡介
Openstack taskflow 簡介
Semelhante a Memory Leak in JavaScript: Understanding and Avoiding Common Causes
What's New in JavaScript
What's New in JavaScript
Dan Cohn
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
Visual Engineering
Node.js System: The Landing
Node.js System: The Landing
Haci Murat Yaman
JavaScript 2016 for C# Developers
JavaScript 2016 for C# Developers
Rick Beerendonk
Yes, But
Yes, But
Erin Dees
PHP Static Code Review
PHP Static Code Review
Damien Seguy
Apache Commons - Don\'t re-invent the wheel
Apache Commons - Don\'t re-invent the wheel
tcurdt
CoffeeScript
CoffeeScript
Scott Leberknight
Terraform: начинайте использовать, если еще не.
Terraform: начинайте использовать, если еще не.
Serhii Vasylenko
Symfony & Javascript. Combining the best of two worlds
Symfony & Javascript. Combining the best of two worlds
Ignacio Martín
Node.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitter
Simen Li
JavaScript for Web Analysts
JavaScript for Web Analysts
Lukáš Čech
Javascript do jeito certo
Javascript do jeito certo
Alexandre Gomes
Functional Reactive Programming with RxJS
Functional Reactive Programming with RxJS
stefanmayer13
The Ring programming language version 1.10 book - Part 70 of 212
The Ring programming language version 1.10 book - Part 70 of 212
Mahmoud Samir Fayed
Damn Fine CoffeeScript
Damn Fine CoffeeScript
niklal
2013-06-15 - Software Craftsmanship mit JavaScript
2013-06-15 - Software Craftsmanship mit JavaScript
Johannes Hoppe
2013-06-24 - Software Craftsmanship with JavaScript
2013-06-24 - Software Craftsmanship with JavaScript
Johannes Hoppe
Jakarta Commons - Don't re-invent the wheel
Jakarta Commons - Don't re-invent the wheel
tcurdt
JavaScript Growing Up
JavaScript Growing Up
David Padbury
Semelhante a Memory Leak in JavaScript: Understanding and Avoiding Common Causes
(20)
What's New in JavaScript
What's New in JavaScript
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
Node.js System: The Landing
Node.js System: The Landing
JavaScript 2016 for C# Developers
JavaScript 2016 for C# Developers
Yes, But
Yes, But
PHP Static Code Review
PHP Static Code Review
Apache Commons - Don\'t re-invent the wheel
Apache Commons - Don\'t re-invent the wheel
CoffeeScript
CoffeeScript
Terraform: начинайте использовать, если еще не.
Terraform: начинайте использовать, если еще не.
Symfony & Javascript. Combining the best of two worlds
Symfony & Javascript. Combining the best of two worlds
Node.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitter
JavaScript for Web Analysts
JavaScript for Web Analysts
Javascript do jeito certo
Javascript do jeito certo
Functional Reactive Programming with RxJS
Functional Reactive Programming with RxJS
The Ring programming language version 1.10 book - Part 70 of 212
The Ring programming language version 1.10 book - Part 70 of 212
Damn Fine CoffeeScript
Damn Fine CoffeeScript
2013-06-15 - Software Craftsmanship mit JavaScript
2013-06-15 - Software Craftsmanship mit JavaScript
2013-06-24 - Software Craftsmanship with JavaScript
2013-06-24 - Software Craftsmanship with JavaScript
Jakarta Commons - Don't re-invent the wheel
Jakarta Commons - Don't re-invent the wheel
JavaScript Growing Up
JavaScript Growing Up
Mais de Tchelinux
Do Zero ao YouTube em menos de 10 softwares livres - Vinícius Alves Hax - Tch...
Do Zero ao YouTube em menos de 10 softwares livres - Vinícius Alves Hax - Tch...
Tchelinux
Insegurança na Internet - Diego Luiz Silva da Costa - Tchelinux 2019 Rio Grande
Insegurança na Internet - Diego Luiz Silva da Costa - Tchelinux 2019 Rio Grande
Tchelinux
Explorando Editores de Texto Open Source - Gabriel Prestes Ritta - Tchelinux ...
Explorando Editores de Texto Open Source - Gabriel Prestes Ritta - Tchelinux ...
Tchelinux
Desenvolvendo Jogos com PyGame - Jerônimo Medina Madruga - Tchelinux 2019 Rio...
Desenvolvendo Jogos com PyGame - Jerônimo Medina Madruga - Tchelinux 2019 Rio...
Tchelinux
Me formei. E agora? - Matheus Cezar - Tchelinux 2019 Rio Grande
Me formei. E agora? - Matheus Cezar - Tchelinux 2019 Rio Grande
Tchelinux
APIs, REST e RESTful: O que os programadores precisam saber? - Marcos Echevar...
APIs, REST e RESTful: O que os programadores precisam saber? - Marcos Echevar...
Tchelinux
Shell Script: Seu melhor amigo na automatização de instalações e configuraçõe...
Shell Script: Seu melhor amigo na automatização de instalações e configuraçõe...
Tchelinux
WebRTC: Comunicação aberta em tempo real - Nelson Dutra Junior - Tchelinux 20...
WebRTC: Comunicação aberta em tempo real - Nelson Dutra Junior - Tchelinux 20...
Tchelinux
Introdução à programação funcional com Clojure - Victor Hechel Colares - Tche...
Introdução à programação funcional com Clojure - Victor Hechel Colares - Tche...
Tchelinux
Construindo um Data Warehouse - Vítor Resing Plentz - Tchelinux 2019 Rio Grande
Construindo um Data Warehouse - Vítor Resing Plentz - Tchelinux 2019 Rio Grande
Tchelinux
Bikeshedding - Márcio Josué Ramos Torres - Tchelinux 2019 Rio Grande
Bikeshedding - Márcio Josué Ramos Torres - Tchelinux 2019 Rio Grande
Tchelinux
Produção de textos com Latex - Samuel Francisco Ferrigo - Tchelinux Caxias do...
Produção de textos com Latex - Samuel Francisco Ferrigo - Tchelinux Caxias do...
Tchelinux
A tecnologia no futuro e nas mãos de quem ela estará - Jaqueline Trevizan, Ne...
A tecnologia no futuro e nas mãos de quem ela estará - Jaqueline Trevizan, Ne...
Tchelinux
oVirt uma solução de virtualização distribuída opensource - Daniel Lara - Tch...
oVirt uma solução de virtualização distribuída opensource - Daniel Lara - Tch...
Tchelinux
Sistemas Embarcados e Buildroot - Renato Severo - Tchelinux Caxias do Sul 2019
Sistemas Embarcados e Buildroot - Renato Severo - Tchelinux Caxias do Sul 2019
Tchelinux
Com que ônibus eu vou? Uma gentil introdução ao Python.
Com que ônibus eu vou? Uma gentil introdução ao Python.
Tchelinux
O TCC... um dia ele chega! (The beautiful and easy LaTeX way.
O TCC... um dia ele chega! (The beautiful and easy LaTeX way.
Tchelinux
Não deixe para testar depois o que você pode testar antes.
Não deixe para testar depois o que você pode testar antes.
Tchelinux
Desenvolvendo jogos com pygame
Desenvolvendo jogos com pygame
Tchelinux
Essa câmera faz fotos muito boas, né?
Essa câmera faz fotos muito boas, né?
Tchelinux
Mais de Tchelinux
(20)
Do Zero ao YouTube em menos de 10 softwares livres - Vinícius Alves Hax - Tch...
Do Zero ao YouTube em menos de 10 softwares livres - Vinícius Alves Hax - Tch...
Insegurança na Internet - Diego Luiz Silva da Costa - Tchelinux 2019 Rio Grande
Insegurança na Internet - Diego Luiz Silva da Costa - Tchelinux 2019 Rio Grande
Explorando Editores de Texto Open Source - Gabriel Prestes Ritta - Tchelinux ...
Explorando Editores de Texto Open Source - Gabriel Prestes Ritta - Tchelinux ...
Desenvolvendo Jogos com PyGame - Jerônimo Medina Madruga - Tchelinux 2019 Rio...
Desenvolvendo Jogos com PyGame - Jerônimo Medina Madruga - Tchelinux 2019 Rio...
Me formei. E agora? - Matheus Cezar - Tchelinux 2019 Rio Grande
Me formei. E agora? - Matheus Cezar - Tchelinux 2019 Rio Grande
APIs, REST e RESTful: O que os programadores precisam saber? - Marcos Echevar...
APIs, REST e RESTful: O que os programadores precisam saber? - Marcos Echevar...
Shell Script: Seu melhor amigo na automatização de instalações e configuraçõe...
Shell Script: Seu melhor amigo na automatização de instalações e configuraçõe...
WebRTC: Comunicação aberta em tempo real - Nelson Dutra Junior - Tchelinux 20...
WebRTC: Comunicação aberta em tempo real - Nelson Dutra Junior - Tchelinux 20...
Introdução à programação funcional com Clojure - Victor Hechel Colares - Tche...
Introdução à programação funcional com Clojure - Victor Hechel Colares - Tche...
Construindo um Data Warehouse - Vítor Resing Plentz - Tchelinux 2019 Rio Grande
Construindo um Data Warehouse - Vítor Resing Plentz - Tchelinux 2019 Rio Grande
Bikeshedding - Márcio Josué Ramos Torres - Tchelinux 2019 Rio Grande
Bikeshedding - Márcio Josué Ramos Torres - Tchelinux 2019 Rio Grande
Produção de textos com Latex - Samuel Francisco Ferrigo - Tchelinux Caxias do...
Produção de textos com Latex - Samuel Francisco Ferrigo - Tchelinux Caxias do...
A tecnologia no futuro e nas mãos de quem ela estará - Jaqueline Trevizan, Ne...
A tecnologia no futuro e nas mãos de quem ela estará - Jaqueline Trevizan, Ne...
oVirt uma solução de virtualização distribuída opensource - Daniel Lara - Tch...
oVirt uma solução de virtualização distribuída opensource - Daniel Lara - Tch...
Sistemas Embarcados e Buildroot - Renato Severo - Tchelinux Caxias do Sul 2019
Sistemas Embarcados e Buildroot - Renato Severo - Tchelinux Caxias do Sul 2019
Com que ônibus eu vou? Uma gentil introdução ao Python.
Com que ônibus eu vou? Uma gentil introdução ao Python.
O TCC... um dia ele chega! (The beautiful and easy LaTeX way.
O TCC... um dia ele chega! (The beautiful and easy LaTeX way.
Não deixe para testar depois o que você pode testar antes.
Não deixe para testar depois o que você pode testar antes.
Desenvolvendo jogos com pygame
Desenvolvendo jogos com pygame
Essa câmera faz fotos muito boas, né?
Essa câmera faz fotos muito boas, né?
Último
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Sergiu Bodiu
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
Ravi Sanghani
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
LoriGlavin3
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
LoriGlavin3
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
IES VE
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Alkin Tezuysal
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
Knoldus Inc.
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Pixlogix Infotech
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
AliaaTarek5
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
Rick Flair
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
HarshalMandlekar2
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Pim van der Noll
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
Skynet Technologies
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
panagenda
A Framework for Development in the AI Age
A Framework for Development in the AI Age
Cprime
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
Wes McKinney
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
Curtis Poe
Último
(20)
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
A Framework for Development in the AI Age
A Framework for Development in the AI Age
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
Memory Leak in JavaScript: Understanding and Avoiding Common Causes
1.
Memory Leak in JavaScript
2.
Renan Bastos! Analista e
Desenvolvedor de Software na AZION TECHNOLOGIES @renanbastos93 2
3.
Memory Life cycle Tempo
de vida de cada alocação de memória. 💣
4.
“ Alocando memória 4 var num
= 25; var str = 'Renan'; var arr = [1, null, 'tree']; var obj = { k1: 1993, k2: null }; function fun(num) { return num + 2; } someElement.addEventListener('click', function() { someElement.style.backgroundColor = 'blue'; }, false);
5.
“ Referência de Memória 5 var
firstObject = { key: "value" }; var otherObject = firstObject; console.log(firstObject == otherObject); // TRUE
6.
Garbage Collector ◇ O
que é? ◇ Para que serve? ◇ Como funciona? 6
7.
Exemplo: 7 var someArray =
[]; function createSomeNodes() { var div; var frag = document.createDocumentFragment(); for (var i=100; i > 0; i--) { div = document.createElement("div"); div.appendChild(document.createTextNode(i + " - "+ new Date().toTimeString())); frag.appendChild(div); } document.getElementById("nodes").appendChild(frag); } function grow() { someArray.push(new Array(1000000).join('x')); createSomeNodes(); setTimeout(grow,1000); }
8.
Ilustrando o Memory
Leak 8
9.
9
10.
10
11.
Como evitar esse problema? ◇
Remover variável inutilizada ◇ Remover referência de memória 11
12.
Exemplo: 12 var firstObj =
{event: "TcheLinux"}; var letsGoEvent = firstObj; function appendRefInArray(){ for(var i=0; i<1000000; i++){ this["ref" + i] = Object.create(letsGoEvent); } console.log(this["ref0"] == this["ref1"]); console.log(firstObj == this["ref0"]); } letsGoEvent = null; firstObj.using = true; delete firstObj.using ;
13.
Referências https://auth0.com/blog/four-types-of-leaks-in-your-javascript-code-and-how-to-get-rid-of-them/ https://blog.sessionstack.com/how-javascript-works-memory-management-how-to-handle-4-common-memory-leaks-3f28b94cfbec https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memory_Management https://javascript.info/garbage-collection https://developers.google.com/web/tools/chrome-devtools/memory-problems/ 13
14.
Obrigado! Qualquer dúvida? Contate-me: ◇ @renanbastos93 ◇
renanbastos.tec@gmail.com 14
Baixar agora