Discover why WebSocket objects stay in memory after going out of scope. Learn how event listeners prevent garbage collection and how to properly clean up WebSocket connections.