Memory growth observed in CodePen Live Preview after repeated pen edits
0 reputation · 29 Jul 2021, 21:07 UTC
Goal: Verify whether CodePen’s Live Preview iframe reliably detaches and garbage‑collects its DOM nodes and event listeners after each pen edit‑save cycle.
Uncertainty: The official documentation describes the iframe as reused for performance but does not specify when or how internal resources are cleared, and a community workaround of forcing a full page reload suggests that memory may accumulate over repeated edits.
Questions: Does the preview iframe release all attached DOM nodes and listeners after each save? Is there a measurable threshold of edits after which memory growth becomes noticeable? Can developers depend on the iframe’s reuse without needing a manual reload to keep memory usage stable?