|
|
Thorsten Froehlich wrote:
> Darren New wrote:
>
>>Not true. You have to also account for the object's reference count
>>overflowing, for example.
>
> Sorry, can't help responding to this: If your reference counter variable
> size is the same as your native pointer size, it can *never* overflow.
Yes, but that's very inefficient, especially if you have objects that
are persisted elsewhere (e.g., if you have objects distributed across
many computers, or stored in named files, or in an OO database). Most
reference-counted systems allocate between five and eight bits for
reference counts. Incidentally, that's another reason reference counting
isn't used much - the size penalty. And you still have to be able to do
mark-and-sweep to account for circular references anyway.
--
Darren New / San Diego, CA, USA (PST)
Just because you find out you are
telepathic, don't let it go to your head.
Post a reply to this message
|
|