Hi Ralf, I have just done a first pass review and understand the motivation behind the change but feel that it's not general purpose enough to be robust, so while an improvement on the current approach it doesn't full address the possibility of different Options object mapping to different loaded models.
I think the right approach would be to use the filename string and Options object as a key rather than just attempting to reuse the filename to encode extra information. To be robust I think one would need to clone the Option object when creating the key and compare on the contents rather than the pointers. This would also require a comparison operator to be added to the Options object. I feel solving the problem properly is the right way to go, even if it does mean more parts of the OSG have to be adapted for the task. Cheers. Robert. On 30 May 2016 at 11:00, Ralf Habacker <[email protected]> wrote: > Hi Robert, > > the appended file contains a patch fixing an object cache issue, we had > in an application > (http://www.openscenegraph.org/index.php/gallery/use-cases/189-fm-profil) > > Objects with the same filename may be different from others based on the > provided plugin options. Using filename *and* the provided options as > object cache key helps to avoid fetching the wrong object. > > > related commit > https://github.com/rhabacker/osg/commit/b41f6dd905df2a39c97bbde8d9f986572c80f285 > > Regards > Ralf > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
