destroy_property
- omni.graph.tools.destroy_property(self, property_name: str)
Call the destroy method on a property and set it to None - helps with garbage collection
In a class’s destroy() or __del__ method you can call this to generically handle member destruction when such things do not happen automatically (e.g. when you cross into the C++-bindings, or the objects have circular references)
- def destroy(self):
destroy_property(self, “_widget”)
If the property is a list then the list members are individually destroyed. If the property is a dictionary then the values of the dictionary are individually destroyed.
NOTE: Only call this if you are the owner of the property, otherwise just set it to None.
- Parameters
self – The object owning the property to be destroyed (can be anything with a destroy() method)
property_name – Name of the property to be destroyed