Mojo trait
UnknownDestructibility
The most basic trait that all Mojo types extend by default.
This trait indicates that a type has no destructor and therefore no lifetime
management. It is the default for all types unless they explicitly implement
AnyType or ImplicitlyDestructible.
Types with this trait:
- Have no __del__method
- Do not perform any cleanup when they go out of scope
- Are suitable for simple value types that don't own resources
For types that need cleanup when they are destroyed, use ImplicitlyDestructible
or AnyType instead.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
