The Arrays are just templated so

To remove the contents you can  do base_vertices->clear();

as the osg::Array is referenced counted and thus you cannot directly use
delete you simply need to do



base_vertices->unref() which will decrement the reference count which when
it reaches zero will self delete



Best Regards



Gordon

__________________________________________________________

Gordon Tomlinson
Email  : gordon.tomlinson @ overwatch.com
YIM/AIM: Gordon3dBrit
MSN IM : Gordon3dBrit @ 3dSceneGraph.com


__________________________________________________________




"Self defence is not a function of learning tricks
but is a function of how quickly and intensely one
can arouse one's instinct for survival"
- Master Tambo Tetsura


  -----Original Message-----
  From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ivan Bolèina
  Sent: Wednesday, November 22, 2006 4:04 PM
  To: osg users
  Subject: [osg-users] delete osg::Vec3Array


  Hi.

  How can I delete
  osg::Vec3Array* base_vertices =

  new osg::Vec3Array(NumberOfVertexInBox);
  when not longer needed?

  delete base_vertices;

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

Reply via email to