When should I implement IDisposable?

Posted by Bobby on Stack Overflow See other posts from Stack Overflow or by Bobby
Published on 2010-03-12T09:04:46Z Indexed on 2010/03/12 9:27 UTC
Read the original article Hit count: 369

Filed under:
|
|
|
|

What is the best practice for when to implement IDisposable?

Is the best rule of thumb to implement it if you have one managed object in the class, or does it depend if the object was created in the class or just passed in? Should I also do it for classes with no managed objects at all?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#