Garbage
Collection is CLR help to clean unused managed objects, and reclaim memory.
Generation
0,1,2, object in generation 0 will move to generation 1, and generation 1 will
move to generation 2. More in Generation 1 and 2 is not good, because memory
cannot reclaim
The GC.Collect method is called to run Garbage Collection immediately.
SupressFinalize
- should called by a class that has finalize.
- It inform the GC that this object was cleaned up fully.
- To prevent the dispose method from running twice
No comments:
Post a Comment