Hi,

On Fri, 2010-02-05 at 15:17 -0600, Carsten Neumann wrote:
>       Hello all,
> 
> attached patch derives FieldHandle from MemoryObject and makes the use 
> of boost::shared_ptr obsolete.
> I think this is useful because FieldHandle then behaves like everything 
> else that is ref counted and just uses our own pointer types (and 
> dynamic_pointer_cast) which is hopefully less confusing than if it is 
> the one-off thing that uses shared_ptr.
>
> Additionally, the shared_ptr stuff has been showing up in profiles when 
> running GraphOps (may have gotten better with more recent boost version 
> because of optimizations for the ref counter storage it allocates) and 
> there is not really a reason why FieldHandle can't have an intrusive ref 
> count in the first place.


hmm there was some intention in using a different thing and not calling
the pointers XXXRefPtr for the FieldHandles as they are for very short
lived local use only, for example they do not keep the container behind
them alive. So I did/do not want to get them to close to the mechanisms
we use for storage. 

Similar I do/did not want them derived from MemoryObject as elements
derived from it are intended to be stored, which FieldHandles absolutely
are not meant to. 

I see the point with the performance. 

So if we switch to using intrusive counting for performance reasons I
would like to keep the names different from what we use for the rest
where storage is intended, e.g. I would more tend to keep using XXXPtr 
instead of XXXRefPtr. Ideally I would not have Ptr anywhere in there,
in the end I used it because I needed to cast them, so maybe we should
rethink this and complete switch away from naming them Ptr.

Similar I would prefer to put the intrusive counters directly into the
base class and not have them derive from MemoryObject.

kind regards
  gerrit





------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to