|
![](/i/fill.gif) |
clipka <ano### [at] anonymous org> wrote:
> But doesn't the "this-pointer tracking" in a reference-tracking GC
> approach incur approximately that very same penalty?
Efficient GC algorithms are extremely complicated and I don't know in
detail how they work, but AFAIK they do not keep track of all references
all the time, but only periodically. That means that when a method is
called, it doesn't necessarily incur any penalty at all in terms of
memory management.
(This means that objects are not destroyed immediately when the last
reference to them disappears. Only when the GC algorithm determines at
some point that no reference exists to an object, will it mark to be
eventually removed.)
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |