"But, I don't really get it. What does inheritance have to do with this? If there is no finalizer on the class, then GC.SupressFinalizer will do nothing as my understanding goes."
Yes, it does nothing. But someone could derive from that class and the derived class could have a finalizer, then GC.SuppressFinalizer is needed. Of course, if this is a Silverlight application and not a control library that can be used for 3rd parties then you know which classes are derived from and have finalizers so probably you can just ignore this issue.
"There are very, very few unmanaged resources in our system, so I'm still struggling to understand why we should implement this clunky pattern for the sake of something that might happen in 1 out of 300 classes."
It seems to me that instead of trying to figure out what caused the memory leak you went and made every control disposable without understanding what's really needed and what's not. In particular, cases like "we ... tried to unhook any object references" are normally quite rare.
No comments:
Post a Comment