Carsten Neumann wrote:
> the reference count is stored in the pointed-to object (here:
> GLUTWindow), not the pointer. After the ClusterServer constructor the
> GLUTWindow object has a ref count of 2.
Ah, OK, that's good to know.
> I'm not sure what you mean be "two uncoordinated reference counts",
> there is only one ref count, it is modified by the two pointers.
By "uncoordinated" I meant unrelated or unconnected. I wasn't aware
that the reference count is stored in the pointed-to object.
(
Side note:
I was thinking of something more like the boost::shared_ptr model.
For example, this dumb bit of code would result in "two uncoordinated
reference counts":
boost::shared_ptr<T> t1 (new T);
boost::shared_ptr<T> t2 (t1.get());
t1 and t2 are ignorant of each other. They each see a reference count
of 1 although they refer to the same T*.
)
> some ideas to debug this further:
> - you can access the reference count of an object with
> FieldContainer::getRefCount()
> - a way to check if a container is still 'alive' is to store its id
> (FieldContainer::getId()) at creation time and later when you want to
> check it ask the FieldContainterFactory::the()->getContainer(id). If you
> get a NULL pointer the container is not 'alive' any more.
This is very useful information. Thank you.
--
Ted
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users