Hi Torben,

On Mon, Jul 18, 2011 at 9:35 PM, Torben Dannhauer <[email protected]> wrote:
> I can think of two solutions:
> 1. Removing the static function to "invite" users to hold an instance in 
> their application to allow caching
> 2. use a static instance of the callback ref_ptr to provide the persistent 
> class instance to enable caching.
>
> 2. looks good for me, but I'm sure I missed several reasons against that 
> static solution. ;)

Thread safety is the key reason behind not using a static cache.

The other solutions would be to pass in the DatabaseCacheReadCallback
to the static method so that it could be used by the intersection
traversal so enable the intersection to keep reusing the cache.

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to