C# language: why WeakReference or Weak Event Pattern?
问题 I'm reading "The C# Language", 4th edition, it talks about WeakReference and Weak Event Pattern : CHRISTIAN NAGEL: Memory leaks often result from wrong usage of events. If client objects attach to events but do not detach from them, and the reference to the client object is no longer used, the client object still cannot be reclaimed by the garbage collector because the reference by the publisher remains. This can be avoided by (1) detaching of events when the client object is no longer used,