Click here to Skip to main content
15,911,327 members
Home / Discussions / C#
   

C#

 
Generalvalue in the controls like label, txt box should be clear in btnClear_Click Pin
ybasha14-Aug-08 19:43
ybasha14-Aug-08 19:43 
GeneralRe: value in the controls like label, txt box should be clear in btnClear_Click Pin
Christian Graus14-Aug-08 20:13
protectorChristian Graus14-Aug-08 20:13 
QuestionBad Icon Pin
Silvyster14-Aug-08 14:34
Silvyster14-Aug-08 14:34 
AnswerRe: Bad Icon Pin
leckey14-Aug-08 14:40
leckey14-Aug-08 14:40 
GeneralRe: Bad Icon Pin
Silvyster14-Aug-08 14:47
Silvyster14-Aug-08 14:47 
GeneralRe: Bad Icon Pin
Mark Churchill14-Aug-08 15:41
Mark Churchill14-Aug-08 15:41 
GeneralRe: Bad Icon Pin
Silvyster14-Aug-08 15:46
Silvyster14-Aug-08 15:46 
GeneralRe: Bad Icon Pin
Mark Churchill14-Aug-08 15:56
Mark Churchill14-Aug-08 15:56 
GeneralRe: Bad Icon Pin
Silvyster14-Aug-08 16:05
Silvyster14-Aug-08 16:05 
GeneralRe: Bad Icon Pin
Mark Churchill14-Aug-08 16:23
Mark Churchill14-Aug-08 16:23 
QuestionWindows Appearance settings mess with Window Sizes Pin
JKrigelman14-Aug-08 14:27
JKrigelman14-Aug-08 14:27 
AnswerRe: Windows Appearance settings mess with Window Sizes Pin
JKrigelman15-Aug-08 6:20
JKrigelman15-Aug-08 6:20 
QuestionAutomatically cleanup of "managed resources" when object dies Pin
invictus314-Aug-08 13:45
invictus314-Aug-08 13:45 
AnswerRe: Automatically cleanup of "managed resources" when object dies Pin
Mark Churchill14-Aug-08 14:16
Mark Churchill14-Aug-08 14:16 
AnswerRe: Automatically cleanup of "managed resources" when object dies Pin
AhsanS14-Aug-08 22:28
AhsanS14-Aug-08 22:28 
GeneralRe: Automatically cleanup of "managed resources" when object dies Pin
invictus315-Aug-08 0:39
invictus315-Aug-08 0:39 
GeneralRe: Automatically cleanup of "managed resources" when object dies Pin
AhsanS15-Aug-08 1:02
AhsanS15-Aug-08 1:02 
GeneralRe: Automatically cleanup of "managed resources" when object dies Pin
invictus315-Aug-08 1:15
invictus315-Aug-08 1:15 
Ok, thanks.

However, this is not without pain. It seems like by saying:

using(someobj = new someclass()) {}

the Dispose method will be called, while doing:

someobj = null;

will NOT trigger the Dispose method. Does this mean that if I want to manually force the memory management to deal with it I have to say:

someobj.Dispose();
someobj = null;

In that case, just making a Close method where I close all resources manually seems a lot easier in the short run, since the whole point of my post was to avoid such manual labor in an attempt to release all resources automatically.

Although the GC will "eventually" trigger the destructor when just kicking the objekt out of scope, this seems a bit weird since I have not been able to release files in the destructor without exceptions saying there are none.
GeneralRe: Automatically cleanup of "managed resources" when object dies Pin
AhsanS15-Aug-08 1:43
AhsanS15-Aug-08 1:43 
GeneralRe: Automatically cleanup of "managed resources" when object dies Pin
invictus316-Aug-08 3:10
invictus316-Aug-08 3:10 
GeneralRe: Automatically cleanup of "managed resources" when object dies Pin
Scott Dorman16-Aug-08 5:16
professionalScott Dorman16-Aug-08 5:16 
GeneralRe: Automatically cleanup of "managed resources" when object dies Pin
invictus316-Aug-08 6:20
invictus316-Aug-08 6:20 
GeneralRe: Automatically cleanup of "managed resources" when object dies Pin
Scott Dorman16-Aug-08 7:04
professionalScott Dorman16-Aug-08 7:04 
AnswerRe: Automatically cleanup of "managed resources" when object dies Pin
invictus320-Aug-08 11:17
invictus320-Aug-08 11:17 
QuestionGoogle Contacts API fails with 403 Forbidden Always Pin
Vasudevan Deepak Kumar14-Aug-08 8:32
Vasudevan Deepak Kumar14-Aug-08 8:32 

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.