When I use TclBlend to create and subsequently destroy Itcl objects I get a
memory growth problem. If I do the same operation without TclBlend no growth
occurs.
Here's my baseline Tcl-only script that doesn't cause the Tcl shell to grow
in (memory) size:
package require Itcl 3.0
::itcl::class TestClass {}
proc createAndDelete {} {
set d [TestClass ::#auto]
::itcl::delete object $d
}
set iterations 10000000
for {set i 0} {$i < $iterations} {incr i} {
createAndDelete
}
Here's a Java class that performs the same createAndDelete operation:
import tcl.lang.*;
public class MemTest {
protected Interp myInterp = null;
public MemTest(Interp interp) {
myInterp = interp;
}
public void createAndDelete() throws TclException {
myInterp.eval("set d [TestClass ::#auto]");
myInterp.eval("::itcl::delete object $d");
}
}
And here's the Tcl script that uses TclBlend to create the Java object and
call it's createAndDelete method:
package require java 1.2.6
package require Itcl 3.0
::itcl::class TestClass {}
set memtest [java::new com.kla_tencor.catalyst.MemTest [java::getinterp]]
set iterations 10000000
for {set i 0} {$i < $iterations} {incr i} {
$memtest createAndDelete
}
When I run this TclBlend version the Tcl shell uses ever increasing amounts
of memory. The combination of versions I'm using are:
TclBlend 1.2.6
Tcl 8.0.5
Itcl 3.0
Java 1.3
Windows NT 4.0 SP5
Any ideas or suggestions?
----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
An archive is available at http://www.mail-archive.com/tcljava@scriptics.com