diff --git a/python-temel/referans.sayaci.2.py b/python-temel/referans.sayaci.2.py new file mode 100644 index 0000000..acc85bb --- /dev/null +++ b/python-temel/referans.sayaci.2.py @@ -0,0 +1,17 @@ +import sys + +class Sample: + def __del__(self): + print('__del__ called') + +a = Sample() +print(sys.getrefcount(a)) +b = a +print(sys.getrefcount(a)) +c = b +print(sys.getrefcount(a)) +c = None +print(sys.getrefcount(a)) +b = None +print(sys.getrefcount(a)) +a = None