-
Notifications
You must be signed in to change notification settings - Fork 0
Description
This is a giant design choice.
Currently everything is raw pointers.
Either optimize to smart pointer system (Currently trouble understanding if typecasting and children objects work properly this way) or use life system.
Life system entails:
-Branches all have boolean variable for being_terminated
-Special function is called once being_terminatedis executed, polymorphed function.
-Objects/branches to be terminated removed from every list in engine (not by user) on next frame selected for destruction.
-Objects who link or refer to object MUST check if object is viable for next frame or risk immediate crash or bugs...
-Garbage collection life object will once every second or frame or user-selected time remove objects selected for termination.
--After removed from each list, object is finally deleted UNDER ASSUMPTION that other objects no longer reference it....
--Object is NEVER rendered or stepped/updated once being_terminated is set to true.