Hi,
I have a very basic question.
I write a loop like this:
while(true)
{
MyTestClass myObject = new MyTestClass();
}
- When will be the object created in the loop, garbage collected?
- Also, for every iteration, is it that the new memory location is allocated to the myObject reference?
- What if i write
myObject = null;
at the end of every iteration?