diff --git a/csharp_fundamentals/5_working_with_reference_types_and_value_types.md b/csharp_fundamentals/5_working_with_reference_types_and_value_types.md index 57fc012..91d5f02 100644 --- a/csharp_fundamentals/5_working_with_reference_types_and_value_types.md +++ b/csharp_fundamentals/5_working_with_reference_types_and_value_types.md @@ -94,4 +94,8 @@ Differentiate btw Value & Reference: How to check whether it's reference or value type: * Place cursor in VSCode to type, Press `F12`, we can see metadata for the type. It will show whether it's `struct` or `class` -* The only exception is `String`, it's a reference type but often behave like a value type (i.e. passed as value in function by default) \ No newline at end of file +* The only exception is `String`, it's a reference type but often behave like a value type (i.e. passed as value in function by default) + +## Taking Advantage of Garbage Collection + +.NET runtime provide Garbage Collection service: keep track of objects created, recycle memeory by itself when nothing reference the obj. \ No newline at end of file