summaryrefslogtreecommitdiffstats
path: root/tests/ooNext2.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-08-07 15:46:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-08-07 15:46:09 (GMT)
commit73502b8525ebea0be169656f9b8abe994145b6bb (patch)
treebbf523102341bcdd9dbbcf0f2d711f8b1e363a97 /tests/ooNext2.test
parentf25cac5641054cdcb10695a12976ec96d0f55e26 (diff)
downloadtcl-73502b8525ebea0be169656f9b8abe994145b6bb.zip
tcl-73502b8525ebea0be169656f9b8abe994145b6bb.tar.gz
tcl-73502b8525ebea0be169656f9b8abe994145b6bb.tar.bz2
[Bug 3387082]: Plug memory leak in call chain introspection.
Diffstat (limited to 'tests/ooNext2.test')
-rw-r--r--tests/ooNext2.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ooNext2.test b/tests/ooNext2.test
index 51f02c5..eeade11 100644
--- a/tests/ooNext2.test
+++ b/tests/ooNext2.test
@@ -513,6 +513,21 @@ test oo-call-1.18 {object call introspection - memory leaks} -body {
info object call oo::object destroy
}
} -constraints memory -result 0
+test oo-call-1.19 {object call introspection - memory leaks} -setup {
+ oo::class create leaktester { method foo {} {dummy} }
+} -body {
+ leaktest {
+ set lt [leaktester new]
+ oo::objdefine $lt method foobar {} {dummy}
+ list [info object call $lt destroy] \
+ [info object call $lt foo] \
+ [info object call $lt bar] \
+ [info object call $lt foobar] \
+ [$lt destroy]
+ }
+} -cleanup {
+ leaktester destroy
+} -constraints memory -result 0
test oo-call-2.1 {class call introspection} -setup {
oo::class create root
@@ -684,6 +699,16 @@ test oo-call-2.13 {class call introspection - memory leaks} -body {
info class call oo::class destroy
}
} -constraints memory -result 0
+test oo-call-2.14 {class call introspection - memory leaks} -body {
+ leaktest {
+ oo::class create leaktester { method foo {} {dummy} }
+ [leaktester new] destroy
+ list [info class call leaktester destroy] \
+ [info class call leaktester foo] \
+ [info class call leaktester bar] \
+ [leaktester destroy]
+ }
+} -constraints memory -result 0
test oo-call-3.1 {current call introspection} -setup {
oo::class create root