Click here to Skip to main content
15,912,977 members
Home / Discussions / C#
   

C#

 
QuestionForm's distructor not called upon close... Pin
Shy Agam10-Feb-07 3:57
Shy Agam10-Feb-07 3:57 
AnswerRe: Form's distructor not called upon close... Pin
Guffa10-Feb-07 4:04
Guffa10-Feb-07 4:04 
GeneralRe: Form's distructor not called upon close... Pin
Shy Agam10-Feb-07 4:25
Shy Agam10-Feb-07 4:25 
GeneralRe: Form's distructor not called upon close... Pin
Scott Dorman10-Feb-07 4:53
professionalScott Dorman10-Feb-07 4:53 
GeneralRe: Form's distructor not called upon close... Pin
Shy Agam10-Feb-07 4:59
Shy Agam10-Feb-07 4:59 
GeneralRe: Form's distructor not called upon close... Pin
Colin Angus Mackay10-Feb-07 5:00
Colin Angus Mackay10-Feb-07 5:00 
GeneralRe: Form's distructor not called upon close... Pin
Shy Agam10-Feb-07 5:04
Shy Agam10-Feb-07 5:04 
GeneralRe: Form's distructor not called upon close... Pin
Guffa10-Feb-07 5:51
Guffa10-Feb-07 5:51 
Colin Angus Mackay wrote:
If your class holds onto any large amounts of memory, or unmanaged resources or any class that does then you should implement the IDisposable interface.


Actually, using large amounts of memory is not any reason to implement the IDisposable interface (unless it's unmanaged memory, of course).

The garbage collector doesn't sort out the objects that can be freed, it sorts out the objects that needs to be kept, and frees everything else. If you remove the reference to an object, the object and all it's members will be garbage collected all at once. As there are no references to the object, the references that it contains are not considered when sorting out the objects to keep. By removing the reference to an object, you also effectively remove all references that it contains.

---
single minded; short sighted; long gone;

AnswerRe: Form's distructor not called upon close... Pin
PIEBALDconsult10-Feb-07 15:14
mvePIEBALDconsult10-Feb-07 15:14 
GeneralRe: Form's distructor not called upon close... Pin
Shy Agam10-Feb-07 20:34
Shy Agam10-Feb-07 20:34 
QuestionShutdown Pc from withing code! Pin
Hussam Fattahi10-Feb-07 3:06
Hussam Fattahi10-Feb-07 3:06 
AnswerRe: Shutdown Pc from withing code! Pin
M Harris10-Feb-07 3:15
M Harris10-Feb-07 3:15 
QuestionParameter value '2.3333333333333333333333333333' is out of range Pin
Nafiseh Salmani10-Feb-07 0:38
Nafiseh Salmani10-Feb-07 0:38 
AnswerRe: Parameter value '2.3333333333333333333333333333' is out of range Pin
Colin Angus Mackay10-Feb-07 1:08
Colin Angus Mackay10-Feb-07 1:08 
QuestionWindows Service Pin
Syed Shahid Hussain10-Feb-07 0:15
Syed Shahid Hussain10-Feb-07 0:15 
AnswerRe: Windows Service Pin
Michael P Butler10-Feb-07 1:25
Michael P Butler10-Feb-07 1:25 
GeneralRe: Windows Service Pin
Syed Shahid Hussain11-Feb-07 17:30
Syed Shahid Hussain11-Feb-07 17:30 
AnswerRe: Windows Service Pin
Dave Kreskowiak10-Feb-07 4:09
mveDave Kreskowiak10-Feb-07 4:09 
GeneralRe: Windows Service Pin
Syed Shahid Hussain11-Feb-07 17:32
Syed Shahid Hussain11-Feb-07 17:32 
GeneralRe: Windows Service Pin
Dave Kreskowiak12-Feb-07 2:22
mveDave Kreskowiak12-Feb-07 2:22 
GeneralRe: Windows Service Pin
Syed Shahid Hussain12-Feb-07 17:22
Syed Shahid Hussain12-Feb-07 17:22 
QuestionDistance CAlculator Pin
Shriya Kapoor10-Feb-07 0:09
Shriya Kapoor10-Feb-07 0:09 
AnswerRe: Distance CAlculator Pin
Colin Angus Mackay10-Feb-07 0:27
Colin Angus Mackay10-Feb-07 0:27 
Questionconverting from hexadecimal to char Pin
Mohammad Daba'an10-Feb-07 0:01
Mohammad Daba'an10-Feb-07 0:01 
AnswerSolution Pin
Mohammad Daba'an10-Feb-07 0:23
Mohammad Daba'an10-Feb-07 0:23 

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.