On Friday 25 February 2005 05:12, Dossy Shiobara wrote:
> I started playing with the tDOM "createNodeCmd" and "appendFromScript"
> idiom in AOLserver, and I think it (may?) be a cause for memory leakage.
I cannot confirm this. We are using it for about 5 years in
very demanding app and there is no memory leaks with tdom as far
as I know. I would have noticed this already years ago.
>
> In particular, the [dom createNodeCmd] thing creates an actual Tcl proc.
> AOLserver, at the end of request processing, doesn't "clean up" new
> procs that were defined as part of the request. This would include
> these new procs defined using [dom createNodeCmd].
All procs are dumped by Tcl interpreter being dumped when the
connection thread exits.
> Another scary side effect of this:
>
> % dom createNodeCmd elementNode string
> ::string
>
> % string is integer abcd
> called outside domNode context
This is not scary. If you do:
proc string {} {
return [string]
}
it will also junk your string command. The createNodeCmd just
creates another Tcl command. If you happen to name it as some
already existent Tcl command, it is your decision. Tcl will
also not forbid you renaming existing commands, or?
>
> OK, so where did the real Tcl [string] proc go? Poof, gone. This is
> also a neat side-effect:
>
> % rename ::string {}
> % string is integer abcd
> self-referential recursion in "unknown" for command "string"
>
> Huh? Weird.
Weird is what you're expecting. Please be aware that createNodeCmd
creates a special Tcl command which can be only used from within
the node context as the above error message correctly says:
% string is integer abcd
called outside domNode context
>
> Anyhow -- I guess this a big caveat or warning to everyone using tDOM
> with AOLserver if you're using [dom createNodeCmd] -- this way is
> fraught with peril. Use at your own risk.
This is not a big caveat and nobody should be warned. This is
absolutely OK. You wanted to scratch/redefine the Tcl proc.
Hence you must live with the side-effects. You kave the knife.
How you use it, this is in your responsibility.
--
With kind regards,
Mit besten Gruessen,
Meilleures Salutations,
___________________________________________
Zoran Vasiljevic, Vice President, CTO
E-mail: mailto:[EMAIL PROTECTED]
Web: http://www.archiware.com
Phone: +49 89 319 084 98
Fax: +49 89 319 084 99
S-mail: ArchiWare(R) GmbH
Gutenbergstr. 3
D-85716 Munich, Germany
___________________________________________
PresSTORE(R) - Backup Synchronize Archive
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.