DestructorApplies to: cppA destructor runs when an object is destroyed, releasing resources tied to the object's lifetime. ~File() { close(); } See also: raii, class