Clear memory on logout or closing the browser

any dashboard that I open and close on browser whether through a logout button or just closing the tab, the RAM is still at the level consumption when it was open. Is there a way to clear them out?

Would it be possible for you to make a reproducible example including demonstrating how you see the RAM is at the same level?