How do you manage memory leak issues and optimize garbage collection in a high-throughput Java or Node.js application?