commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Horman <jhor...@musicmatch.com>
Subject [jelly] variable scope
Date Wed, 02 Oct 2002 19:52:52 GMT
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.
 
-jason
 
This email message and any attachments are for the sole use of the intended
recipient(s) and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient or his/her representative, please contact the
sender by reply email and destroy all copies of the original message.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message