python __delL__自動回收

 對象消失或再無引用時自動調用__del__。 class Person: def __init__(self): print('init....') def __del__(self): print('對象內存回收了') person = Person() print('程序結束')  (二)引用情況
相關文章
相關標籤/搜索