Which sequence correctly describes how to programmatically capture a heap snapshot in Node.js and then analyze it for retained objects?
AUse the 'fs' module to write process.memoryUsage() output to a file and analyze it with a text editor
BCall process.memoryUsage() repeatedly and log the output to detect retained objects
CUse the 'v8' module's getHeapSnapshot() to create a stream, save it to a file, then load it in Chrome DevTools for analysis
DInvoke global.gc() and then check console logs for retained objects