summaryrefslogtreecommitdiff
path: root/Lib/test/dtracedata/instance.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/dtracedata/instance.py')
-rw-r--r--Lib/test/dtracedata/instance.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/Lib/test/dtracedata/instance.py b/Lib/test/dtracedata/instance.py
new file mode 100644
index 0000000000..f1421378b0
--- /dev/null
+++ b/Lib/test/dtracedata/instance.py
@@ -0,0 +1,24 @@
+import gc
+
+class old_style_class():
+ pass
+class new_style_class(object):
+ pass
+
+a = old_style_class()
+del a
+gc.collect()
+b = new_style_class()
+del b
+gc.collect()
+
+a = old_style_class()
+del old_style_class
+gc.collect()
+b = new_style_class()
+del new_style_class
+gc.collect()
+del a
+gc.collect()
+del b
+gc.collect()