public member function
Destroys the object.
Before being destroyed, member function close is automatically called.
The object is modified.
No-throw guarantee: never throws exceptions (any exception thrown by an internal operation is caught by the constructor and not rethrown).