How to free up render memory?

Could you share the code you’re using to dispose of objects, or a demo?