commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: [jelly] variable scope
Date Thu, 03 Oct 2002 07:52:33 GMT
From: "Jason Horman" <jhorman@musicmatch.com>
> I am creating objects via "usebean" that are quite large, 300-400mbs. What
> are my options currently for removing these objects from memory once I am
> done with them?
>
> Right now I am doing this:
>
> <useBean var="largeObject" class="blah"/>
>
> <bsh:script>
>     jellyContext.removeVariable("largeObject");
> </bsh:script>
>
> I noticed that some jelly variables, like "set", have a scope attribute
but
> it seems to be used to differenciate between container scopes. I think
that
> a new "scope" or "block" tag with its own context scope could be useful.
> Something similar to language { } blocks.
>
> <jelly>
>
>     <scope>
>         <set var="var1" />
>         <useBean var="var2" />
>     </scope>
>
>     <!-- var1 and var2 no longer exist -->
>
> </jelly>
>
> It seems pretty easy to implement, the scope tag just has to pass along a
> new context object to its children.


I've just added a <j:remove var="foo"/> tag and a <j:scope> tag as discussed
to CVS. Enjoy :-)

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message