Answer by lil_billy
well im aware of the benefit of using using lol however i didnt know that C# handled garbage collection that way Knowing that bit now I would say yes you could get away with it however there would be...
View ArticleAnswer by Owen Reynolds
Not an expert, but USING isn't for garbage collection. It's for "special" things like files, to be absolutely sure the Close statement gets called in every single case. I'd guess that the actual memory...
View ArticleAnswer by Dave Carlile
Any object you create that references limited, external, non-managed resources - files likely being the most common - should be created with *using* to make sure those resources are released as soon as...
View ArticleAnswer by nsejosh
All "using" does is call Dispose on the included variables when the using block goes out of scope, assuming those objects implement IDisposable. It has _nothing_ to do with triggering garbage...
View ArticleAnswer by lil_billy
well im aware of the benefit of using using lol however i didnt know that C# handled garbage collection that way Knowing that bit now I would say yes you could get away with it however there would be...
View ArticleAnswer by Owen-Reynolds
Not an expert, but USING isn't for garbage collection. It's for "special" things like files, to be absolutely sure the Close statement gets called in every single case. I'd guess that the actual memory...
View ArticleAnswer by Dave-Carlile
Any object you create that references limited, external, non-managed resources - files likely being the most common - should be created with *using* to make sure those resources are released as soon as...
View ArticleAnswer by nsejosh
All "using" does is call Dispose on the included variables when the using block goes out of scope, assuming those objects implement IDisposable. It has _nothing_ to do with triggering garbage...
View Article