Nuxt Interview Prep
  • Home
  • Study
  • Train
  • Mock interview
  • Flashcards
  • Notes
  • Checklists
  • Glossary
  • Behavioural
  • Stats
  • Syncoff
  • Settings
  • Nuxt docs
martinnavratil.dev

Memory leaks

Study section
  1. Notes
  2. Memory leaks

Three lifetimes, server and client leak patterns, heap-snapshot detection, safe patterns.

Pages

  • Three lifetimesProcess, request and client session — what lives in each, who owns it, and the one question that tells you where a value belongs.
  • Server-side leaksThe thirteen ways a Nuxt/Nitro server holds on to request-lifetime objects, what each one looks like in production, and the before/after for the ones that actually happen.
  • Client-side leaksThe eleven ways a long-lived browser tab keeps hold of unmounted components — listeners, timers, observers, third-party instances, orphaned effects and growing global state — with the Nuxt and VueUse fixes.
  • Detecting and measuringHow to prove a leak instead of guessing — health-route baselines, the Chrome DevTools snapshot workflow, production-safe Node flags, the navigate-20-times client test, and a memory watermark test for CI.
  • Patterns to adoptThe rules a layer or module author follows so the leak catalogues become someone else's reading — lifetimes, scopes, bounded caches, cleanup contracts, and the review checklist every PR goes through.

Notes for the whole section