PC Review


Reply
Thread Tools Rate Thread

Dispose or not dispose ?

 
 
=?Utf-8?B?S2V2ZW4gQ29yYXp6YQ==?=
Guest
Posts: n/a
 
      29th Dec 2004
Hi, I'm quite new to compact framework but I've read several articles on it,
I've explored codes and so on.

What's is not clear to me is if it is better or not to call the dispose
method when an object is not more used.

I read that the garbage collector make the job for us but in other articles
I saw some code with the calls to the dispose method.

Which is the rule to follow ? Dispose or not dispose ?

Thank you in advance.

Keven Corazza
 
Reply With Quote
 
 
 
 
Daniel Moth
Guest
Posts: n/a
 
      29th Dec 2004
If the object exposes a Dispose method then call it when you are done with
it.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/


"Keven Corazza" <(E-Mail Removed)> wrote in message
news:47A91312-5578-4AFA-BCFA-(E-Mail Removed)...
> Hi, I'm quite new to compact framework but I've read several articles on
> it,
> I've explored codes and so on.
>
> What's is not clear to me is if it is better or not to call the dispose
> method when an object is not more used.
>
> I read that the garbage collector make the job for us but in other
> articles
> I saw some code with the calls to the dispose method.
>
> Which is the rule to follow ? Dispose or not dispose ?
>
> Thank you in advance.
>
> Keven Corazza



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does DataGridView.Dispose Call DataGridViewRow.Dispose? eBob.com Microsoft VB .NET 13 31st Jul 2009 03:08 PM
Dispose Pattern -- why void Dispose() is nonvirtual? gz Microsoft Dot NET 2 24th Jan 2008 09:18 PM
Dispose, Dispose(true), Finalize, IDisposable tascien@gmail.com Microsoft Dot NET 1 27th Jul 2007 02:01 AM
Form.Dispose does not invoke InputPanel.Dispose tomj@softhome.net Microsoft Dot NET Compact Framework 3 24th Jan 2006 04:28 PM
the difference betweenSqlConnection.IDisposable.Dispose() andSqlConnection.Dispose(). tangyong Microsoft Dot NET Framework 1 20th Jan 2006 05:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:56 PM.