this code will make circular reference!, if object disable automatic garbage collection,"gc.disable()", running it will make memory leaking!
import gc, sys
def test_func():
objs = gc.get_objects()
priint("-----End: test_func %s" % sys.getrefcount(test_func))
test_func()
l know this is right, but why???
import gc, sys
def test_func():
objs = gc.get_objects()
del objs
priint("-----End: test_func %s" % sys.getrefcount(test_func))
test_func()
version: 2.7 thank bro!