I've been struggling with memory leaks issues in my Angular application for a few months now and haven't been able to find a solution. The memory heap is not flushed until my pods restart every 6 hours even though the application has a relatively low load. I've gone through several discussions on this topic and implemented the following solutions, but none have resolved the problem: I've migrated to Angular Universal (@angular/ssr) 18. I've changed the scoping of all my services (I provided them in main.server.ts instead of using providedIn: "root") so that each request gets a new instance. I've reviewed all Observables in both components and services (as I have many Observables subscribed in services) and ensured all subscriptions are properly unsubscribed. Despite all these actions, the memory keeps increasing over time, never getting flushed, leading to pod restarts. Do you have any suggestion? Thanks. Continue reading...