If an object is reachable by application code it can not collected by GC this is called Strong Reference.
A weak reference permits the garbage collector to collect the object while still allowing the application to access the object. Weak reference are useful for objects that use a lot of memory but can be re created easily if they are reclaimed by garbage collector. WeakReference is a data type in .Net.
No comments:
Post a Comment