Click here to Skip to main content
15,920,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: Dynamically creating calender Pin
Brij11-Nov-08 18:26
mentorBrij11-Nov-08 18:26 
AnswerRe: Dynamically creating calender Pin
dan!sh 11-Nov-08 21:45
professional dan!sh 11-Nov-08 21:45 
QuestionPass Table Name Build Your Form ? Pin
Ahmed R El Bohoty11-Nov-08 17:38
Ahmed R El Bohoty11-Nov-08 17:38 
QuestionDispose or not? Pin
cocoonwls11-Nov-08 16:22
cocoonwls11-Nov-08 16:22 
AnswerRe: Dispose or not? Pin
Richard Blythe11-Nov-08 17:24
Richard Blythe11-Nov-08 17:24 
AnswerRe: Dispose or not? Pin
N a v a n e e t h11-Nov-08 17:29
N a v a n e e t h11-Nov-08 17:29 
AnswerRe: Dispose or not? Pin
Guffa11-Nov-08 23:32
Guffa11-Nov-08 23:32 
AnswerRe: Dispose or not? Pin
Scott Dorman12-Nov-08 4:21
professionalScott Dorman12-Nov-08 4:21 
Just to reiterate what has already been said, an array itself doesn't support disposal but the objects contained in the array may, in which case you want to iterate over the items and call Dispose on each item. In this particular case, you have an array of int, which doesn't require disposal.

Setting the array to null in this scenario will have no effect. The JIT compiler (and by extension the GC) is smart enough to know when the object is no longer in use.

The thing to keep in mind is that the GC will only collect this array after it is no longer in use and when enough memory pressure exists to trigger a collection cycle. It won't necessarily be collected when the method goes out of scope.

Scott Dorman
Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA

[Blog][Articles][Forum Guidelines]
Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

AnswerRe: Dispose or not? Pin
cocoonwls17-Nov-08 17:46
cocoonwls17-Nov-08 17:46 
QuestionGenerate C# Symbols from IDE Pin
Ken Mazaika11-Nov-08 16:21
Ken Mazaika11-Nov-08 16:21 
AnswerRe: Generate C# Symbols from IDE Pin
Simon P Stevens11-Nov-08 23:32
Simon P Stevens11-Nov-08 23:32 
QuestionDatabase search engine code? Pin
Richard Blythe11-Nov-08 16:01
Richard Blythe11-Nov-08 16:01 
AnswerRe: Database search engine code? Pin
Ashfield11-Nov-08 20:59
Ashfield11-Nov-08 20:59 
QuestionAccess to the path is denied Pin
dec8211-Nov-08 15:50
dec8211-Nov-08 15:50 
AnswerRe: Access to the path is denied Pin
Richard Blythe11-Nov-08 15:56
Richard Blythe11-Nov-08 15:56 
AnswerRe: Access to the path is denied Pin
Brij11-Nov-08 17:28
mentorBrij11-Nov-08 17:28 
QuestionHow to embed another executable into a C# Window Form? Pin
bbdaffy11-Nov-08 14:18
bbdaffy11-Nov-08 14:18 
AnswerRe: How to embed another executable into a C# Window Form? Pin
Dave Kreskowiak11-Nov-08 17:46
mveDave Kreskowiak11-Nov-08 17:46 
AnswerRe: How to embed another executable into a C# Window Form? Pin
Giorgi Dalakishvili11-Nov-08 19:25
mentorGiorgi Dalakishvili11-Nov-08 19:25 
QuestionCreating a timeline editor Pin
Eric Burns11-Nov-08 11:53
Eric Burns11-Nov-08 11:53 
QuestionSome quetion xml Pin
E_Gold11-Nov-08 10:30
E_Gold11-Nov-08 10:30 
AnswerRe: Some quetion xml Pin
PIEBALDconsult11-Nov-08 11:07
mvePIEBALDconsult11-Nov-08 11:07 
AnswerRe: Some quetion xml Pin
nelsonpaixao11-Nov-08 13:44
nelsonpaixao11-Nov-08 13:44 
AnswerRe: Some quetion xml Pin
N a v a n e e t h11-Nov-08 17:34
N a v a n e e t h11-Nov-08 17:34 
QuestionSpecific XML Format Pin
Jammer11-Nov-08 9:31
Jammer11-Nov-08 9:31 

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.