Click here to Skip to main content
15,900,681 members
Home / Discussions / C#
   

C#

 
GeneralRe: Dynamically Creating Treeview Nodes Question Pin
Rafone29-Jan-09 11:42
Rafone29-Jan-09 11:42 
Questionmemory allocated on heap in method Pin
devvvy29-Jan-09 2:14
devvvy29-Jan-09 2:14 
AnswerRe: memory allocated on heap in method Pin
Rob Philpott29-Jan-09 2:17
Rob Philpott29-Jan-09 2:17 
QuestionRe: memory allocated on heap in method Pin
Eddy Vluggen29-Jan-09 2:22
professionalEddy Vluggen29-Jan-09 2:22 
AnswerRe: memory allocated on heap in method Pin
devvvy29-Jan-09 2:27
devvvy29-Jan-09 2:27 
AnswerRe: memory allocated on heap in method Pin
Eddy Vluggen29-Jan-09 2:33
professionalEddy Vluggen29-Jan-09 2:33 
GeneralRe: memory allocated on heap in method Pin
S. Senthil Kumar29-Jan-09 3:04
S. Senthil Kumar29-Jan-09 3:04 
AnswerRe: memory allocated on heap in method Pin
Guffa29-Jan-09 5:21
Guffa29-Jan-09 5:21 
The object is up for garbage collection as soon as it's not used any more.

Actually, setting the reference to null is totally pointless in this scenario. The garbage collector knows that the object is not used any more after the call to DoSomeWork, so the object may even be collected before you set the reference to null.

It's not the scope of the variable that decides garbage collection, only usage. The garbage collector only cares about where the objects are used, it's just the compiler that cares about the scope of variables.

Despite everything, the person most likely to be fooling you next is yourself.

AnswerRe: memory allocated on heap in method [modified] Pin
Luc Pattyn29-Jan-09 5:30
sitebuilderLuc Pattyn29-Jan-09 5:30 
GeneralRe: memory allocated on heap in method Pin
N a v a n e e t h29-Jan-09 5:51
N a v a n e e t h29-Jan-09 5:51 
AnswerRe: memory allocated on heap in method Pin
Luc Pattyn29-Jan-09 8:54
sitebuilderLuc Pattyn29-Jan-09 8:54 
GeneralRe: memory allocated on heap in method Pin
N a v a n e e t h29-Jan-09 15:44
N a v a n e e t h29-Jan-09 15:44 
AnswerRe: memory allocated on heap in method Pin
Luc Pattyn29-Jan-09 15:52
sitebuilderLuc Pattyn29-Jan-09 15:52 
Questionhow to vertically scan an image in c# Pin
Swati Khanna29-Jan-09 1:58
Swati Khanna29-Jan-09 1:58 
AnswerRe: how to vertically scan an image in c# Pin
musefan29-Jan-09 1:59
musefan29-Jan-09 1:59 
GeneralRe: how to vertically scan an image in c# Pin
Swati Khanna29-Jan-09 2:02
Swati Khanna29-Jan-09 2:02 
GeneralRe: how to vertically scan an image in c# Pin
musefan29-Jan-09 2:03
musefan29-Jan-09 2:03 
GeneralRe: how to vertically scan an image in c# Pin
Swati Khanna29-Jan-09 2:08
Swati Khanna29-Jan-09 2:08 
GeneralRe: how to vertically scan an image in c# Pin
musefan29-Jan-09 2:13
musefan29-Jan-09 2:13 
GeneralRe: how to vertically scan an image in c# Pin
Eddy Vluggen29-Jan-09 2:21
professionalEddy Vluggen29-Jan-09 2:21 
GeneralRe: how to vertically scan an image in c# Pin
musefan29-Jan-09 2:30
musefan29-Jan-09 2:30 
GeneralRe: how to vertically scan an image in c# Pin
Swati Khanna29-Jan-09 2:35
Swati Khanna29-Jan-09 2:35 
Questionstacking of 2d images Pin
Nettai29-Jan-09 1:15
Nettai29-Jan-09 1:15 
AnswerRe: stacking of 2d images Pin
musefan29-Jan-09 1:33
musefan29-Jan-09 1:33 
GeneralRe: stacking of 2d images Pin
Nettai29-Jan-09 1:49
Nettai29-Jan-09 1:49 

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.