J
jdn
I've read various things about this and am not sure what the 'best
practice' (hate that phrase but there you go) procedure is.
Suppose in a class I have something like:
Object myObject;
where Object is some class I've created.
I do things with myObject. Instantiate it, pass data to and from it,
kick it around, in various methods.
Within those methods, should I do:
myObject = null;
or not? I've read various threads in Google etc. and some say that
since garbage collection is set up a certain way for .NET, you don't
need to do this; others say it is still a good idea.
I haven't been able to find on MSDN a definitive answer (not that it
isn't there, just haven't found it). So what is it?
BTW, myObject is not a SQL connection, etc.
TIA
jdn
practice' (hate that phrase but there you go) procedure is.
Suppose in a class I have something like:
Object myObject;
where Object is some class I've created.
I do things with myObject. Instantiate it, pass data to and from it,
kick it around, in various methods.
Within those methods, should I do:
myObject = null;
or not? I've read various threads in Google etc. and some say that
since garbage collection is set up a certain way for .NET, you don't
need to do this; others say it is still a good idea.
I haven't been able to find on MSDN a definitive answer (not that it
isn't there, just haven't found it). So what is it?
BTW, myObject is not a SQL connection, etc.
TIA
jdn