Implemented global objects destruction code