Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
What is the use of IDispose interface, destructors
Roy S
Jan 7 2011 7:57 AM
2.6k
Reply
I have an abstract class called Shape which has a protected GraphicsPath that's used by the Graphics.DrawPath in the main class to draw the shape. There are also a few other classes that inherit Shape.
It all works but I found an option in vs2010 called 'run code analysis on ...' which tells me that I should implement the IDisposable interface because of that GraphicsPath. I did that but what exactly should I do in the Dispose method? Just grapicsPath.Dispose()?
Should the other classes also implement the interface if the base class already does?
And what about destructors? I have never used one, when are they needed?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Key binding
how to read excel template from an excel file?