Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
GeneralRe: Using "using" Pin
Spacix One7-May-08 11:08
Spacix One7-May-08 11:08 
AnswerRe: Using "using" Pin
N a v a n e e t h6-May-08 4:23
N a v a n e e t h6-May-08 4:23 
AnswerRe: Using "using" Pin
led mike6-May-08 4:31
led mike6-May-08 4:31 
GeneralRe: Using "using" Pin
Roger Alsing6-May-08 7:10
Roger Alsing6-May-08 7:10 
AnswerRe: Using "using" Pin
Guffa6-May-08 4:37
Guffa6-May-08 4:37 
GeneralRe: Using "using" Pin
Roger Alsing6-May-08 7:45
Roger Alsing6-May-08 7:45 
GeneralRe: Using "using" Pin
Guffa6-May-08 9:53
Guffa6-May-08 9:53 
AnswerRe: Using "using" Pin
S. Senthil Kumar6-May-08 4:43
S. Senthil Kumar6-May-08 4:43 
John Simmons / outlaw programmer wrote:
I realize that this ensures that everything will be properly closed and disposed without you having to do anything, but doesn't the same thing happen when the object goes out of scope?


Not when the object goes out of scope, but when the GC runs and that too only if the object has a finalizer. Garbage collection cleans up the object itself; it doesn't attempt to clean up any resources held by the object. IDisposable (and the finalizer) do the resource cleanup part.

Regards
Senthil [MVP - Visual C#]
_____________________________
My Blog | My Articles | My Flickr | WinMacro

AnswerRe: Using "using" Pin
DavidNohejl6-May-08 4:50
DavidNohejl6-May-08 4:50 
GeneralRe: Using "using" Pin
Pete O'Hanlon6-May-08 9:01
mvePete O'Hanlon6-May-08 9:01 
AnswerRe: Using "using" Pin
PIEBALDconsult6-May-08 5:25
mvePIEBALDconsult6-May-08 5:25 
GeneralRe: Using "using" Pin
Spacix One6-May-08 10:20
Spacix One6-May-08 10:20 
GeneralRe: Using "using" Pin
PIEBALDconsult6-May-08 12:24
mvePIEBALDconsult6-May-08 12:24 
QuestionConverting ActiveDirectory createTimeStamp to DateTime [modified] Pin
scotlfs6-May-08 3:59
scotlfs6-May-08 3:59 
AnswerRe: Converting ActiveDirectory createTimeStamp to DateTime Pin
scotlfs6-May-08 4:38
scotlfs6-May-08 4:38 
QuestionEnums and text descriptions Pin
MrEyes6-May-08 3:41
MrEyes6-May-08 3:41 
AnswerRe: Enums and text descriptions Pin
CPallini6-May-08 3:48
mveCPallini6-May-08 3:48 
AnswerRe: Enums and text descriptions Pin
J4amieC6-May-08 3:49
J4amieC6-May-08 3:49 
GeneralRe: Enums and text descriptions Pin
MrEyes6-May-08 4:13
MrEyes6-May-08 4:13 
GeneralRe: Enums and text descriptions Pin
J4amieC6-May-08 4:17
J4amieC6-May-08 4:17 
GeneralRe: Enums and text descriptions Pin
MrEyes6-May-08 5:01
MrEyes6-May-08 5:01 
GeneralRe: Enums and text descriptions Pin
PIEBALDconsult6-May-08 5:34
mvePIEBALDconsult6-May-08 5:34 
GeneralRe: Enums and text descriptions Pin
MrEyes6-May-08 5:50
MrEyes6-May-08 5:50 
GeneralRe: Enums and text descriptions Pin
PIEBALDconsult6-May-08 5:28
mvePIEBALDconsult6-May-08 5:28 
GeneralRe: Enums and text descriptions Pin
PIEBALDconsult6-May-08 5:30
mvePIEBALDconsult6-May-08 5:30 

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.