From: Jeffrey H. <jef...@aj...> - 2000-09-11 23:44:38
|
This is a bit of a standard gotcha, and I think that it should be fixed. The 'console' in the Windows/Mac implementation is *always* there by default - whether you see it or not (as evidenced by the fact that 'console show' is a great trick that people like to get an eval console on other systems). 'puts' will put data into the console. This has nothing to do with Itcl (that's all a red herring). Someone reported a similar "mem leak" in tkcon, so I added a default saved line limit (like xterm and all the rest have). This doesn't help much if your data lines are zigKB long, but it works for things like below. The same could be done for the console. Even better would be to have that console just not exist when the user is not running interactively, except via a package. Something like 'package require console'. Then you could fix it up and add more features, and even make it available on Unix. Jeffrey Hobbs Tcl Ambassador ho...@Aj... Ajuba Solutions (nee Scriptics) > -----Original Message----- > From: David Gravereaux [mailto:dav...@aj...] > Subject: (fwd) [Fwd: BUG ?: memory leak using TclPro141 under NT 4.0] > (fwd) > > > I changed the code a bit to be the following: > > ------------------------ > package require Itcl > > itcl::class Ca { > public method Poll {} > } > > itcl::body Ca::Poll { } { > puts "Inside Ca::Poll" > after 50 "$this Poll\;puts \"******** Poll called**************\"" > } > > Ca ObjA > ObjA Poll > > if {[regexp {^(.*)tclsh} [info nameofexecutable]]} { > puts "spawning event loop" > vwait forever > } else { > wm withdraw . > } > > ------------------------ > > running it under tclsh83, I observed no memory growth. > running it under wish83, I did observe a large amount of growth. > > Changing the commandline to pipe output to the console, avoiding the console > widget, I observed no memory growth: > C:\Program Files\Tcl\bin> wish84.exe pollTest.tcl | cat32.exe > > So I'll assume, the console widget is growing it's storage to accommodate all > the output. I don't really see a bug with this. I couldn't check with wish83 > piped due to a bug in win2k, that's checked for in 8.4. > -- > David Gravereaux <dav...@aj...> Yet Another Tcl Guy > Sustaining Engineer (Tech Support) Ajuba Solutions > (650) 230-4079 > -- The TclCore mailing list is sponsored by Ajuba Solutions To unsubscribe: email tcl...@aj... with the word UNSUBSCRIBE as the subject. |