Here is a working demonstration on the behavior of destructors.
Get hands-on with 1400+ tech skills courses.