Click here to Skip to main content
16,014,294 members
Home / Discussions / C#
   

C#

 
QuestionDoes anyone know of any command line email programs that work!!! Pin
Antone Eason8-Jul-09 9:54
professionalAntone Eason8-Jul-09 9:54 
AnswerRe: Does anyone know of any command line email programs that work!!! Pin
Tr@v8-Jul-09 10:19
Tr@v8-Jul-09 10:19 
GeneralRe: Does anyone know of any command line email programs that work!!! [modified] Pin
Antone Eason8-Jul-09 10:30
professionalAntone Eason8-Jul-09 10:30 
GeneralRe: Does anyone know of any command line email programs that work!!! Pin
Tr@v8-Jul-09 10:36
Tr@v8-Jul-09 10:36 
GeneralRe: Does anyone know of any command line email programs that work!!! Pin
Antone Eason8-Jul-09 10:47
professionalAntone Eason8-Jul-09 10:47 
GeneralRe: Does anyone know of any command line email programs that work!!! Pin
danzar8-Jul-09 17:55
danzar8-Jul-09 17:55 
QuestionExplicitly call IDispose() method Pin
Richard Blythe8-Jul-09 9:41
Richard Blythe8-Jul-09 9:41 
AnswerRe: Explicitly call IDispose() method Pin
Luc Pattyn8-Jul-09 10:46
sitebuilderLuc Pattyn8-Jul-09 10:46 
Hi,

this is how I understand it:

1. you should call Dispose(), it makes life easier for the GC, and it frees resources sooner.

2. Managed objects that die will be disposed by GC if and when it runs; it does not run when no more memory requests are needing a garbage collection, and in particular when an app terminates.

3. you must make sure Dispose() is called when unmanaged objects are involved.

4. you don't know (unless it is documented) whether managed classes create unmanaged objects internally, so call Dispose!

5. A process exiting will clean up everything, which does not imply your resources will be in a state you like; e.g. a process will close its open files, it may not have written the closing texts to it if you don't take care.

6. When you hand over a delegate, it includes a "this" pointing to the object on which the delegate is to be called. So passing a delegate to a live object keeps your object alive too. But not the other way around, so it is no problem most of the times.
Example1: your class instantiates a dialog and passes a delegate to one of the dialog buttons; the dialog keeps your class alive, but it was modal anyway. When the dialog closes, it gets disposed and the delegates are gone.
Example2: your form passes a delegate to an object (maybe a singleton) that lives for the life of your app, e.g. to get signaled when a logging component gets a problem, say a disk full condition. When you close your form, it remains alive because of the delegate. If all your forms do this, none of them ever releases its memory.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

GeneralRe: Explicitly call IDispose() method Pin
Richard Blythe8-Jul-09 11:08
Richard Blythe8-Jul-09 11:08 
AnswerRe: Explicitly call IDispose() method Pin
N a v a n e e t h8-Jul-09 17:25
N a v a n e e t h8-Jul-09 17:25 
GeneralRe: Explicitly call IDispose() method Pin
Luc Pattyn8-Jul-09 22:50
sitebuilderLuc Pattyn8-Jul-09 22:50 
GeneralRe: Explicitly call IDispose() method Pin
N a v a n e e t h9-Jul-09 16:40
N a v a n e e t h9-Jul-09 16:40 
AnswerRe: Explicitly call IDispose() method Pin
Curtis Schlak.8-Jul-09 17:39
Curtis Schlak.8-Jul-09 17:39 
GeneralRe: Explicitly call IDispose() method Pin
Daniel Grunwald9-Jul-09 3:38
Daniel Grunwald9-Jul-09 3:38 
QuestionCustom Treeview with Overridden OnPaint & WndProc Pin
VengefulSakhmet8-Jul-09 9:38
VengefulSakhmet8-Jul-09 9:38 
AnswerRe: Custom Treeview with Overridden OnPaint & WndProc Pin
Richard Blythe8-Jul-09 9:44
Richard Blythe8-Jul-09 9:44 
GeneralRe: Custom Treeview with Overridden OnPaint & WndProc Pin
VengefulSakhmet8-Jul-09 10:55
VengefulSakhmet8-Jul-09 10:55 
GeneralRe: Custom Treeview with Overridden OnPaint & WndProc Pin
Richard Blythe8-Jul-09 11:14
Richard Blythe8-Jul-09 11:14 
GeneralRe: Custom Treeview with Overridden OnPaint & WndProc Pin
VengefulSakhmet8-Jul-09 11:57
VengefulSakhmet8-Jul-09 11:57 
QuestionCopy Excel Rows using C# Pin
kasi148-Jul-09 9:01
kasi148-Jul-09 9:01 
AnswerRe: Copy Excel Rows using C# Pin
Manas Bhardwaj8-Jul-09 9:35
professionalManas Bhardwaj8-Jul-09 9:35 
GeneralRe: Copy Excel Rows using C# Pin
kasi148-Jul-09 10:52
kasi148-Jul-09 10:52 
GeneralRe: Copy Excel Rows using C# Pin
EliottA8-Jul-09 11:04
EliottA8-Jul-09 11:04 
GeneralRe: Copy Excel Rows using C# Pin
kasi148-Jul-09 13:10
kasi148-Jul-09 13:10 
QuestionSend email in winform with Yahoo or Gmail account ? Pin
Mohammad Dayyan8-Jul-09 7:47
Mohammad Dayyan8-Jul-09 7:47 

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.