Skip to main content

The "vngen_object_clear" Function


[destroy]booleanOptional: Enables or disables destroying the running object when complete (Default: disabled)


Each VNgen object stores a complex system of data in memory which must be removed when the object is no longer needed to prevent memory leaks. This script frees occupied memory so that the running object can be safely destroyed.

Although it is recommended to always destroy a VNgen object after clearing it, it is possible to continue using the object for other purposes after VNgen has been purged from memory. In this case, to resume using VNgen functions, vngen_object_init must be run again.

To destroy a VNgen object while creating a new one in its place, see vngen_instance_change.

This script is run automatically by any VNgen function which requires destroying the current object (e.g. vngen_goto when jumping to a different object) and therefore does not typically need to be executed manually.