Python object three elements: Identity (value): Address to memory, non-modifiable type (type): Non-modifiable value (value): mutable: You can modify immutable: Cannot modify reference count when reference count is 0 GC is really going to reclaim the allocated memory>>>deff (): ...Pass... >>>ID (f)139655884671288>>> fa=F>>>ID (FA)139655884671288>>>delFA>>>delFID () returns the memory address of the object used to determine whether the same memory object is the same as an integral easing pool (0-1000) 1. For a certain range of integers, Python is allocated in memory in advance2. You can modify the scope of the buffer pool by modifying the source code to recompile python3. The integral type will not be recycled at the same address:>>> a=1>>> b=1>>>ID (a)19419960>>>ID (b)19419960class object is not in an address>>>classA: ...Pass... >>> c=A ()>>> d=A ()>>>ID (c)140100598572888>>>ID (d)140100598572960Is statement: Used to determine if two variables are pointing to the same stored object
Python memory management