‎2008 Apr 10 7:57 AM
‎2008 Apr 10 8:02 AM
hi,
The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources may be reclaimed and reused.
As soon as no more references point to an object, the Garbage Collector removes it from the memory.
The Garbage Collector is a system routine that automatically deletes objects that can no longer be
addressed from the main memory and releases the memory space they occupied.
All independent references in the global main memory are checked. The references point to active objects, which are marked internally.
Independent references are references that have not been defined within a class.
If class or instance attribute references point to other objects, these are also marked.
Objects that are not marked are deleted from the main memory.
Hope this helps, Do reward.
Edited by: Runal Singh on Apr 10, 2008 12:34 PM
‎2008 Apr 10 11:56 AM
Can you give me one example for garbage collector in OOPS ABAP ?
‎2008 Apr 10 2:46 PM
>
> Can you give me one example for garbage collector in OOPS ABAP ?
Not really. It's something that happens in background, and you have no control over it.
matt
‎2008 Apr 10 3:00 PM
Hello,
The ABAP Garbage Collector is only called when the objects aren't referred anymore. I suggest you to read this [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4fbafc9e-0e01-0010-dea9-9d23d1b269fb].
Regards,