reference counts (1) 썸네일형 리스트형 [Python] 객체 LifeCycle과 Garbage Collection (Reference Counts) ■ 객체의 생명주기 (Object LifeCycle) - 객체의 생성부터 파괴, 해제까지의 기간 1) Allocating memory space 2) Binding or associating methods 3) Initialization 4) Destruction ■ 파이썬의 생명주기 1) Definition - Python Interpreter에서 class를 정의한다. 2) Initialization - __init__ 함수를 호출해서 새로운 instance를 생성하여 메모리를 할당하고 초기화한다. - __new__ 함수가 overriding 된 경우,instance 생성시에 __new__ 함수도 호출한다. 3) Access and manipulation - 객체를 사용한다. 4) Destructio.. 이전 1 다음