Hello Gerrit,

Gerrit Voß wrote:
> 0003-fixed-remove-some-dead-code.patch
> 
> you are aware that the two code paths are no identical ? The
> _mfChunks.clear path might trigger memory operations and other nonsense
> in particular stl implementations (ms). 

yes, I just can't come up with a case were it would make a difference 
(for correctness at least). It seems a bit more consistent to set all 
entries to NULL, as that is what e.g. subChunk does.

> If we jumped the hoops to keep the memory alive by not using clear
> initially I expect there might have been a reason. I'll check.

hm, the jumping through hoops like code probably just comes from the 
conversion from 1.x. There std::transform() is used to subRef the chunks 
and set the mfield entries to NullFC. For 2 a simple loop assigning NULL 
should do it.
I'll change it to just set all entries to NULL (using a plain for loop), 
I'm not convinced this makes a big difference, but for consistency with 
the way the other functions work this is probably the best - and it 
still gets rid of most of the code ;)

        Cheers,
                Carsten

------------------------------------------------------------------------------
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to