Do i need to dispose of MySqlCommand?

Posted by acidzombie24 on Stack Overflow See other posts from Stack Overflow or by acidzombie24
Published on 2010-05-24T18:07:32Z Indexed on 2010/05/24 18:11 UTC
Read the original article Hit count: 248

Filed under:
|
|

I find it incredibly annoying to write a using statement on every one of my queries (which require its own command or write parameters.clear()) which sometimes require declaring variables outside of the using block. Its so incredibly annoying and looks much dirtier compared to the version without disposing the object.

Do i need to dispose of it? what happens if i dont? I do know its good practice to dispose of an object when it has that interface.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about mysql