POV-Ray : Newsgroups : povray.off-topic : A tale of two cities : Re: A tale of two cities Server Time
29 Jul 2024 18:15:53 EDT (-0400)
  Re: A tale of two cities  
From: clipka
Date: 14 Mar 2012 13:52:05
Message: <4f60dac5$1@news.povray.org>
Am 14.03.2012 18:16, schrieb Warp:
> clipka<ano### [at] anonymousorg>  wrote:
>> Then again, how would any other GC prevent this kind of thing happening?
>
>    A GC keeps track of *all* the references that are pointing to an object,
> including the 'this' pointer (or whatever the equivalent is in any given
> language).
>
>    You could avoid this problem in a reference-counted scenario by
> incrementing the reference count in the beginning of the function and
> decrementing it when exiting the function, but that's burdensome and
> makes member functions less efficient (especially if they are supposed
> to be fast).

But doesn't the "this-pointer tracking" in a reference-tracking GC 
approach incur approximately that very same penalty?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.