Memory space is expensive in most deployments. It also directly impacts the performance of the solution.
A best practice is to minimize the amount of data stored in memory at any point.
- Overwrite data and delete data whenever possible
- Avoid having a large amount of data in memory. Instead, use Database or files