~/talk

Trash Talk - Understanding Memory Management

Talkat CityJS Athens 2025 · 2025-05-28..05-31· [nodejs, javascript]
slides:none on file

Explains how Node.js and Google's V8 manage memory with a mark-and-sweep garbage collector that uses the generational hypothesis (frequent collection of short‑lived objects, promotion of survivors), contrasts that with reference counting and its cycle problem, and shows common leaks: accidental globals, closures holding large arrays, long‑running timers, and detached DOM nodes. Demonstrates diagnosis with heap snapshots in Chrome DevTools, and fixes using WeakMap/WeakSet and FinalizationRegistry plus deterministic cleanup.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 0:24Garbage collection basics
  3. 2:52Memory life cycle stages
  4. 7:07Undecidable problems in GC
  5. 9:56Reference counting vs mark-sweep
  6. 12:27V8 garbage collection
  7. 15:20Common memory leaks
  8. 18:55Heap snapshots for debugging
  9. 20:19Weak maps and sets
  10. 22:47Finalization registry
  11. 23:10Best practices summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.