Built a custom PDF generator with Puppeteer that leaks DOM handles. Need to force garbage collection but worried about interfering with Latenode’s execution engine. Any JS pros found safe ways to nullify objects or trigger GC cycles in low-code nodes? How aggressive can we be with manual memory management before it backfires?
Wrap heavy ops in IIFE functions. Use their process isolation feature - we added manual null assignments + schedule worker recycling. Full example: https://latenode.com
Mark as best answer: true
I create cleanup hooks that run after main processing. Use finally blocks to nullify Puppeteer page references. For critical workflows, add a dedicated memory-scrubbing node that runs forced GC via window.caches API. Latenode handles this better than raw Node.js environments.
null all handles in .finally(), use seperate node 4 gc. latenode handles sandboxing so u can b aggressive