d@rk_blu3 Posted April 28, 2006 Share Posted April 28, 2006 what is the difference betweenx.disposeandx.close Link to comment Share on other sites More sharing options...
justsomeguy Posted April 28, 2006 Share Posted April 28, 2006 From what I can see, it looks like the Dispose method is implemented by someone who creates a custom class in order to destroy that class gracefully, without any memory leaks or anything else like that.If you don't understand what I just said, you probably need to either 1) do some reading and/or research into object-oriented programming or 2) don't create your own object classes.The Close method looks like it is pre-defined on a lot of built-in objects, but I don't think Close de-allocates memory the way Dispose does. For example, if you Close a database object, it will simply close the connection to the database, but the database object will remain in memory. However, if you Dispose of the database object, the object will automatically close and will be removed from memory. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now