[stringtemplate-interest] what is the use for embeddedInstances ?
Terence Parr
parrt at cs.usfca.edu
Mon Jun 2 16:09:15 PDT 2008
thanks! just added bug:
http://www.antlr.org:8888/browse/ST-39
Ter
On Jun 2, 2008, at 2:48 PM, Jax Law wrote:
> Hi,
>
> In StringTemplate.java, what is the purpose of the LinkedList
> embeddedInstances ?
> I've searched the source tree and there is no usage of this
> LinkedList.
> We've found
> an obscure memory leak issue with embeddedInstances where the list
> has grown
> to 10 million entries. The issue is that when
> StringTemplate.getInstanceOf() method
> is called, the copy it returns is not a true deep copy. It has many
> references to the
> original StringTemplate via the chunks Expr, StringTemplateAST ...etc.
> One of
> these references is accessible to a write() method call stack and thus
> build up the
> embeddedInstances LinkedList.
>
> Since no usage can be found, I am assuming we can make
> addEmbeddedInstance
> a No-Op in our own build ?
>
> Thanks !
>
> Jax
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list