I have been reading this blog where they explain the use of the using() statement, but they mention that some resources are released, I have always heard and read that some resources have to be released or else there is a risk of NOT being released. I hope you can continue helping me. How serious is it that these resources are NOT released?
In short, there are two types of resources: managed and unmanaged.
Managed: These are the resources used by objects that belong to .NET and of which the garbage collector (GC) has a record (hence managed) and from time to time cleans the memory that was used to create those objects.
Unmanaged : These are resources that were created by programs outside of .NET and therefore the garbage collector has no record of them and cannot clean up memory. Examples of these are the resources that are used when making calls to the system to read a file, connect to a database, etc.
The serious thing is that if these resources are used intensively, the memory will run out little by little until it causes a system failure, it is known as a memory leak.
Microsoft documentation