Re: [Fresco-devel] ref counting

Nathaniel Smith <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
On Thu, Oct 31, 2002 at 09:59:56PM -0500, Sean Rae wrote:
> > I'm not sure what you mean by "tracks allocations instead of
> > lifetime".  In general, though, distributed garbage collecting is a
> > wildly unsolved problem; the server can't tell whether some remote
> > client is still holding a reference to an object or not, and the
> > client can't tell whether an object that it no longer has a reference
> > to had its reference count correctly decremented when the last
> > reference was dropped.  Well, except, there is one way -- make sure
> > that whenever you see a new reference, you increment the count, and
> > whenever you forget about a reference, you decrement the count.  This
> > is what _var's do :-)
> I was thinking that in every constructor, the object being created could
> register itself with some service inside of Fresco (strictly for
> developers' use), e.g. inside of Bob() would be _service_register(*this)
> or something similar. That way, if you know that foo_bar() will allocate 4
> objects by how you design (or rather, n+i objects, or whatever), then you
> can allocation_service_assert(4 objects) and it will pop up an error
> message if the method allocated 40 objects instead of 4.  I don't know how
> useful it would be, but it might prove to be a good double-checker for
> allocations.  Hopefully the scene-graph rewrite with the better memory
> management that you referred to will nullify this problem.  See ya.

Oh, huh.  Interesting.  There might be a performance hit when using
it... but then again, with omni's design, there might not be.  To be
thought about.

-- Nathaniel

-- 
Sentience can be such a burden.

This email may be read aloud.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.