Taking Advantage of Garbage Collection
parent
1b458a4503
commit
3ab92d488f
@ -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)
|
||||
* 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.
|
Loading…
x
Reference in New Issue
Block a user