Hello
 
Please check these Links
 
http://www.levibotelho.com/development/how-does-the-garbage-collector-work/
 
https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/fundamentals
 
https://www.c-sharpcorner.com/UploadFile/skumaar_mca/garbage-collection-in-net-framework/
 
https://www.codeproject.com/Articles/1095402/Garbage-Collection-and-Csharp
 
https://stackoverflow.com/questions/5422918/how-does-garbage-collection-and-scoping-work-in-c