[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5150: file_get_contents(https://freedomsponsors.org/api/project/294): failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway
How does an object delete itself? - Forums | Torque 3D

How does an object delete itself?

Expanding and utilizing the engine via C++.
2 posts Page 1 of 1
kent
Posts: 35
Joined: Sun Sep 04, 2016 11:54 pm
by kent » Sat Oct 08, 2016 9:24 am
What is the proper way for a Scene-object derived class to remove itself on the engine side?

I feel like this is simple ... but I haven't a clue.
kent
Posts: 35
Joined: Sun Sep 04, 2016 11:54 pm
by kent » Sat Oct 08, 2016 11:15 pm
OK. Figured it out. Defined in simObject.

safeDeleteObject() - schedules an object to be removed in 1ms.
deleteObject() - deletes the object immediately.

And for the record, you don't really want to call either of these inside unpack_update()..
2 posts Page 1 of 1

Who is online

Users browsing this forum: Bing [Bot] and 1 guest