How Is a UIRenderer Cleaned Up?#
Discard (exit the scope) or reset any smart pointers to objects not needed, when they are finished with. If manually resetting, do this, at the latest, in the releaseView()
function. API objects do not have to be explicitly destroyed, only their smart pointers reset, as they are immediately destroyed when their reference count goes to zero.
Other objects may sometimes hold references to them. Most notably, command buffers and descriptor sets hold references to objects they are using.