Jump to content

x.dispose


d@rk_blu3
 Share

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...