‎2007 Jul 05 7:52 AM
After the program is executed what happens to the instance of a class
‎2007 Jul 05 8:48 AM
hi,
the instance of class is mnothing but an object..and it will be destroyed..and in J2E engine which comes under the netweaver technology..we have garbage collector..this will tak care about the object deletion..
thanks
jaideep
reward if it is useful
‎2007 Jul 05 9:34 AM
Hi Sandeep,
In ABAP, there is a system routine, that automatically deletes objects ( instances) that can no longer be addressed from the memory which is called a garbage collector. It releases the memory space they occupied.
For Eg.
Data: VAR1 TYPE REF TO CLASS1,
VAR2 TYPE REF TO CLASS1.
Now VAR1 & VAR2 are reference varibales.This acts a s a pointer to the objecct.
CREATE OBJECT VAR1.
Now VAR1 will have a momory space allocated in the system
.
CREATE OBJECT VAR2.
Now VAR2 will have a momory space allocated in the system .
Now if we do ,
VAR1 = VAR2.
Now both of the Variables are pointing to the same object . So one object will becone free.
This will get deleted by the garbage collector.