Formatting C drive isn't exactly easy to do. The OS will want to stop that from happening.
Memory leaks are a pain, if that's what it is and it's normally caused by glitchy software other than what you are running. Other than stay resident or open programs, your ram should be at 0% use. When you start a game, the cpu demands files be sent to the ram, so if a 10Kb gun.jpg gets sent to ram, the ram sets aside 10Kb for that files use, waits on the cpu which will eventually demand it from the ram, the ram sends the file and when it's fully exited the ram the ram releases that section and it goes back to 0% used.
With a memory leak, all that happens the same, except the last part, the ram retains that section, so even if the file is totally gone from the ram, the 10Kb is still locked, ram at 1%. And that happens for multiple files over a period of time, each 'locked' section adding up as unusable.
Formatting a drive can be a temporary or permanent fix, highly dependent on exactly what you put back on it. Not all memory leaks are caused by 3rd party software, the OS by itself can also be responsible.
https://www.stellarinfo.com/article/memory-leaks-in-Windows.php