{
  "id": 6754709,
  "title": "Memory Leaks in JavaScript: Diagnosis, Real Causes, and Correction",
  "url": "https://urgent.news/2026/09/11/memory-leaks-em-javascript-diagnostico-causas-reais-e-correcao",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-11T12:02:55.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mrmsoares/memory-leaks-em-javascript-diagnostico-causas-reais-e-correcao-69l"
  },
  "original_language": "pt",
  "account": "A Node.js process that restarts every 40 minutes is often not caused by a logic bug, but rather a memory leak. The classic symptoms include a steady increase in heap size, more frequent garbage collection, and increased latency, ultimately leading to the process being killed due to excessive memory usage. The V8 JavaScript engine uses a mark-and-sweep approach with reachability from a set of roots to determine garbage, not reference counting. A memory leak typically occurs when objects are promoted to the old space and never released, and can be diagnosed using tools like `--expose-gc` and heap snapshots. Common causes of memory leaks include listeners that are never removed.",
  "summary": "Um processo Node.js que reinicia sozinho a cada 40 minutos raramente está com bug de lógica. Está com vazamento de memória. O sintoma clássico: o container roda liso por meia hora, o heap_size_used sobe em degraus, o garbage collector começa a rodar com mais frequência (major GC a cada poucos segundos em vez de a cada poucos minutos), a latência p99 dobra e o orquestrador mata o pod com OOMKilled…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}