Chuck Sembroski (csembro++at++hotmail.com)
Mon, 21 Jun 1999 19:38:56 CDT
I'm trying to confirm the proper way to delete a node so it and its children
will also be deleted. For example, say I create nodes in the usual way:
//////////////
pfGroup *group = new pfGroup(); // create and ref
group->ref();
pfGeode *geode = new pfGeode(); // add children, etc.
group->addChild(geode);
scene->addChild(group); // add to scene
//////////////
What's the proper way to delete this part of the scene graph?
//////////////
scene->removeChild(group); // remove from scene
group->unrefDelete(); // this leaks memory
// or
pfUnrefDelete(group); // this works OK
//////////////
I'm wondering why calling the unrefDelete() member fn doesn't seem to work?
TIA,
Chuck Sembroski
csembro++at++hotmail.com
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com
This archive was generated by hypermail 2.0b2 on Mon Jun 21 1999 - 17:39:01 PDT