Releases reusable resources associated with this element and makes the element unusable.
The element must not be part of a hierarchy nor have any children, otherwise an InvalidOperationException is thrown.
Calling this method makes the element unusable. Only call it when the element is no longer needed.
Exceptions are thrown if you modify the element or add it again.
By default, a VisualElement releases its reusable resources only when it is garbage collected.
Calling this method explicitly releases those resources earlier so the system can immediately reuse them when creating new elements, reducing memory usage.
In most cases, it is more convenient to use VisualElement.Clear on a root element
which will recursively remove all its descendants and call ReleaseResources on each of them.