|An object (instance of a
class) is a resource, so are its sub-objects and its base class sub-objects,
and so on, recursively.
|Notice that Memory is the
only resource that is managed by generic garbage collectors. Heap objects are
sort-of managed, in the sense that their eventual destruction is
|Progress UI is an
interesting case. An object that switches mouse cursor to hourglass in its
constructor and switches it back in its destructor. Gives you a guarantee
that after the command is executed (successfully or not), the cursor will go
back to normal. Similar solutions apply to progress bars, “busy” displays in
the status bar, etc.