When there are no longer any references to a memory block (a Java object), that memory can be reclaimed (collected). Automatic garbage collection is the process of figuring out how to detect when an object in no longer referenced, and how to make that unused memory available for future allocations.
There are a number of garbage collection techniques (eg, reference counts and mark and sweep); Different versions of Java use different algorithms, but recent versions use generational garbage collection, which often proves to be quite efficient.
The reference below describes some of these techniques and provides further references.
No comments:
Post a Comment