# -*- coding: utf-8 -*-
# @Time : 2018/9/19 20:21
# @Author : cxa
# @File : delDemo.py
# @Software: PyCharm
'''
当类被删除的时候,程序会自动执行__del__当中的代码
'''


class t:
    def a(self):
        print("a开始")

    def __del__(self):
        print("结束")


if __name__ == '__main__':
    b = t()
    b.a()
    del b