Click here to Skip to main content
15,898,035 members
Home / Discussions / C#
   

C#

 
GeneralRe: RegionMaster Controls Pin
leppie20-Apr-03 2:33
leppie20-Apr-03 2:33 
GeneralUDP broadcast problem Pin
smartnose19-Apr-03 15:34
smartnose19-Apr-03 15:34 
GeneralDynamically move ScrollBar to bottom in a TextBox or a RichTextBox Pin
krisp19-Apr-03 14:00
krisp19-Apr-03 14:00 
GeneralRe: Dynamically move ScrollBar to bottom in a TextBox or a RichTextBox Pin
J. Dunlap19-Apr-03 14:12
J. Dunlap19-Apr-03 14:12 
GeneralRe: Dynamically move ScrollBar to bottom in a TextBox or a RichTextBox Pin
krisp19-Apr-03 16:11
krisp19-Apr-03 16:11 
GeneralRe: Dynamically move ScrollBar to bottom in a TextBox or a RichTextBox Pin
J. Dunlap19-Apr-03 17:03
J. Dunlap19-Apr-03 17:03 
GeneralGC - again Pin
peterchen19-Apr-03 12:58
peterchen19-Apr-03 12:58 
GeneralRe: GC - again Pin
Paul Ingles19-Apr-03 14:00
Paul Ingles19-Apr-03 14:00 
Ok, here's my understanding of it:

The Dispose method should be used to explicitly free up any internal resources, especially unmanaged ones such as handles etc. However, as far as I remember you should also call the Dispose method of an inherited class (if you have done so.

One other thing (although this is the big I'm shaky on -- haven't been doing this for a while now Smile | :) ), you may also be able to suppress any additional GC finalisation. To do this, the GC class has a SuppressFinalisation method or something. This is the bit I'd check up on in the docs, but as far as I know you seem fine.

However, I also think that its important for calling code to call your Dispose method. Of course, this then means making sure that should an exception be thrown, the Dispose method is still called. Consequently, you'll want to add a call to Dispose in the finally{} block.

In C#, you may also want to check out the using() keyword, but I don't use it that often, I find it easier to read if I explicitly call Dispose where necessary -- which kinda makes me think decent commenting/documenting is a good idea, which of course I abide by Poke tongue | ;-P

--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"

MS Messenger: paul@oobaloo.co.uk

GeneralRe: GC - again Pin
James T. Johnson19-Apr-03 14:02
James T. Johnson19-Apr-03 14:02 
GeneralMaking class properties editable Pin
peterchen19-Apr-03 12:19
peterchen19-Apr-03 12:19 
GeneralRe: Making class properties editable Pin
James T. Johnson19-Apr-03 12:56
James T. Johnson19-Apr-03 12:56 
GeneralRe: Making class properties editable Pin
peterchen19-Apr-03 13:10
peterchen19-Apr-03 13:10 
GeneralPrefixing Classes and Interfaces Pin
J. Dunlap19-Apr-03 11:47
J. Dunlap19-Apr-03 11:47 
GeneralRe: Prefixing Classes and Interfaces Pin
dog_spawn19-Apr-03 12:11
dog_spawn19-Apr-03 12:11 
GeneralRe: Prefixing Classes and Interfaces Pin
J. Dunlap19-Apr-03 12:32
J. Dunlap19-Apr-03 12:32 
GeneralRe: Prefixing Classes and Interfaces Pin
James T. Johnson19-Apr-03 13:00
James T. Johnson19-Apr-03 13:00 
GeneralRe: Prefixing Classes and Interfaces Pin
J. Dunlap19-Apr-03 14:04
J. Dunlap19-Apr-03 14:04 
GeneralRe: Prefixing Classes and Interfaces Pin
Arun Bhalla19-Apr-03 13:32
Arun Bhalla19-Apr-03 13:32 
GeneralRe: Prefixing Classes and Interfaces Pin
J. Dunlap19-Apr-03 14:02
J. Dunlap19-Apr-03 14:02 
GeneralWrappers for P/Invoke Pin
Alex Korchemniy19-Apr-03 8:27
Alex Korchemniy19-Apr-03 8:27 
GeneralRe: Wrappers for P/Invoke Pin
Stephane Rodriguez.19-Apr-03 9:13
Stephane Rodriguez.19-Apr-03 9:13 
GeneralRe: Wrappers for P/Invoke Pin
Alex Korchemniy19-Apr-03 15:34
Alex Korchemniy19-Apr-03 15:34 
GeneralRe: Wrappers for P/Invoke Pin
Stephane Rodriguez.19-Apr-03 20:58
Stephane Rodriguez.19-Apr-03 20:58 
QuestionHwo to use SecondaryBuffer to play sound through Buffer? Pin
JmmJ19-Apr-03 1:02
JmmJ19-Apr-03 1:02 
AnswerRe: Hwo to use SecondaryBuffer to play sound through Buffer? Pin
leppie19-Apr-03 5:22
leppie19-Apr-03 5:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.