Managed resources

G

Guest

Hi,

The unmanaged resources should be cleaned up by the source code directly,
like for example database connection.

I am wondering how to distinguish between managed and unmanaged resources,
how to decide what is managed and what is unmanaged resource? For example
SQLDependency object is managed or unmanaged resource?

Thanks,

Lubomir
 
N

Nicholas Paldino [.NET/C# MVP]

Lubomir,

If the class doesn't implement the IDisposable interface, then I
wouldn't worry about it. If it does, then I would make sure to call the
Dispose implementation as soon as possible.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top