标签云

微信群

扫码加入我们

WeChat QR Code

Is it necessary to set large objects to null when implementing a Dispose() method?


Events and Dispose are not really related. If by "disposed" you mean "collected", then you're right but otherwise your wording isn't very clear.

2018年08月15日50分59秒

To add (a late) caveat to this answer regarding references; there are a only a very few scenarios that can lead to a leak and the mostly commonly 'recognised' leak actually isn't. This MSDN blog has a very good writeup: blogs.msdn.com/b/davidklinems/archive/2005/11/16/493580.aspx

2018年08月14日50分59秒