I think you can get this functionality without a method:

osg::ref_ptr < osg::Vec3Array > array ( new osg::Vec3Array );

...

// Purge excess capacity
osg::ref_ptr < osg::Vec3Array > temp ( new osg::Vec3Array ( *array ) );
array->swap ( *temp );

On 5/22/06, Gustavo Wagner <[EMAIL PROTECTED]> wrote:
> I think it means making the vector use precisely the amount of memory as
> there are elements in the vector, i.e. no extra capacity...

Yes, it does exactly that... And I haven't been able to implement it without
adding this method. Anyone wants to suggest a better name for this
operation?

freeUnusedMemory(), trimUnusedMemory(),
freeUnusedMemoryAsResizeDoesNotDoThis()?

Robert, here is the modified file, based on OSG 1.0 code.


Gustavo


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to