WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   How do I run a destructor before the end of the program? (https://forum.worldviz.com/showthread.php?t=2435)

EnvisMJ 12-10-2009 04:40 PM

How do I run a destructor before the end of the program?
 
I am writing a program that is basically just a bunch of critters running around.
I can create them fine...but how do I run the destructor on them when they die without waiting till the end of the program?

Jeff 12-10-2009 08:19 PM

You can use the .remove() command to permanently remove the object from the scene.

EnvisMJ 12-11-2009 06:34 AM

2 questions about that,
Does the .remove() actually run the destructor also? Does it free up it's resources, etc?

Also, it throws a '...does not have .remove() function' error when I try to run it on my own class object. Do I need to do something special to include .remove()?

Jeff 12-14-2009 05:17 PM

Yes, it will free up resources used.

This method will work on Vizard's node3D objects.


All times are GMT -7. The time now is 11:54 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC