c# – Memory management in C #


Can you please tell me if it is possible to manually manage memory in C #? For example, delete objects when you need to, and not when the garbage collector wants to.


It is possible , but within limited limits, but not at all necessary. If you use classes that implement IDisposable , do not forget about Dispose() (or about the using construct)

Scroll to Top