B
Behzad
hi,
i want to know what happens to objects in an array if i redeclare the
array..
look at the following code:
////my code
public MyClass[] myarray=new MyClass[ somevalue ];
for( int counter = 0 ; counter < somevalue ; counter++ )
myarray[counter]=new MyClass();
///somewhere elese
myarray=new MyClass[ some_new_value ]
////end of code
in this case what will happen to my old intances of MyClass?did they
destroy when i redeclare myarray with some_new_value?
thanks in advance.
behzad
i want to know what happens to objects in an array if i redeclare the
array..
look at the following code:
////my code
public MyClass[] myarray=new MyClass[ somevalue ];
for( int counter = 0 ; counter < somevalue ; counter++ )
myarray[counter]=new MyClass();
///somewhere elese
myarray=new MyClass[ some_new_value ]
////end of code
in this case what will happen to my old intances of MyClass?did they
destroy when i redeclare myarray with some_new_value?
thanks in advance.
behzad