Explain what is We...
Explain what is We...
A weak reference in C# is a special type of reference that allows an object to be garbage collected even if the weak reference is still active. Unlike strong references, which prevent an object from being garbage collected, weak references do not contribute to an object's reference count.
Here are the key points about weak references in C#:
WeakReference
or WeakReference<T>
class.WeakReference
is used for objects of any type, while WeakReference<T>
is used for strongly typed objects.IsAlive
property of the WeakReference
...expert
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào