Compare commits

...

2 Commits

Author SHA1 Message Date
Patrick M
e50701f709 Merge 3e3d42023b into 559d03ecf3 2024-02-27 17:12:23 +08:00
Patrick M
3e3d42023b Garbage collection for C#
Added description and implementation of Garbage collection in the C#.txt file
2021-05-07 13:24:09 -07:00

View File

@@ -398,3 +398,17 @@ CHEATSHEET C#
KeyPress KeyPressEventHandler(object sender, KeyPressEventArgs e) KeyPress KeyPressEventHandler(object sender, KeyPressEventArgs e)
16. Garbage Collection
16.1 Using statements
//A using statement encapsulates the lifetime of an IDisposable object and auto manages memory
using(SomeManagedClass smc){
//Scope of SomeManagedClass
}
//Garbage collection happens here and the CLR disposes the object