Yes, but this means you can only do it at very specific points in your program. E.g. after serving a request. This doesn't work for every type of program.
You can do this today in vanilla C#. Pause garbage collection, then resume it. Done. Even Unity's ancient Mono variants could do this almost a decade ago.