Re: Two things about STk.
Hi Paul,
Sorry for the long delay to answer (but I have taken your remarks into
account for 4.0).
>
> Two things.
>
> Thing one:
> ----------
> I have come across a bug in the process code. I understand
> exactly what is going on and I would be happy to fix it,
> but I can't decide what is the best fix.
>
> Here is how to get it:
>
> (define p (run-process "cat" :input :pipe))
> (define fp (process-input p))
> (set! p 0)
> (set! fp 0)
> (gc)
>
> When 'p' gets garbage collected, free_process calls STk_freeport on
> all its streams.
> ....
I had nothing to do for 4.0 that since it appears to be corrected.
Tell me if you see problems with 4.0.
> Thing two:
> ----------
> When I run purify on an application linked with STk I get lots
> of leaks reported. I haven't looked into how easy or
> difficult they would be to fix. For example,
>
> This memory was allocated from:
> malloc [rtlib.o]
> StringCreate [tclHash.c:507]
> STk_add_callback [tk-glue.c:209]
> DoConfig [tkConfig.c:436]
> Tk_ConfigureWidget [tkConfig.c:180]
> Tk_Menu_ConfigureWidget [tkConfig.c:81]
> ConfigureMenuEntry [tkMenu.c:1511]
> MenuAddOrInsert [tkMenu.c:2114]
>
> Also, things like:
>
> STk_sharp_dot_result(interp, Tk_PathName(butPtr->tkwin));
>
> show up as leaking the string saved to the interp, even though
> it is marked as TCL_VOLATILE.
The problem was that it should be TCL_DYNAMIC rather than
TCL_VOLATILE. I have corrected it (and in another place too).
I have not seen the problem with MenuAddOrInsert, perhaps it has
disappeared. Tell me if the problem still exists if you can run purify on
the new interpreter.
Thanks.
-- Erick
Received on Thu Sep 16 1999 - 18:40:11 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST