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)
commit097bee7c6ba61b29717c1780aed2370468649e4f (patch)
treebbf523102341bcdd9dbbcf0f2d711f8b1e363a97 /tests/ooNext2.test
parentd90ed9c0f07bbb5cf66140e89fcebc0da3f08285 (diff)
downloadtcl-097bee7c6ba61b29717c1780aed2370468649e4f.zip
tcl-097bee7c6ba61b29717c1780aed2370468649e4f.tar.gz
tcl-097bee7c6ba61b29717c1780aed2370468649e4f.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