Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

garbage collection

Former Member
0 Likes
1,541

what is garbage collection

4 REPLIES 4
Read only

Former Member
0 Likes
819

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

Read only

0 Likes
819

Can you give me one example for garbage collector in OOPS ABAP ?

Read only

matt
Active Contributor
0 Likes
819

>

> 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

Read only

Former Member
0 Likes
819

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,