cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: Releasing components in flowscripts
Date Thu, 08 Jan 2004 22:35:14 GMT
Tim Larson wrote:

>I was talking with <tonyc> on #cocoon trying to figure out
>if/when/how components needed to be released in flowscripts,
>and we realized the docs need to be more enlightening.
>
>Here is what we wrote so far:
>All components obtained via getComponent must be explicitly
>released via releaseComponent() in your flowscript before
>calling sendPage() or sendPageAndWait(), otherwise a memory
>leak will occur.  If these components have given you any
>other components (such as a Source), they must be released
>before the parent component is released.
>
>We think this is overstating the releasing requirements for
>sendPage().  Anybody want to help us improve this?
>
>I would also like to put a simple example in the docs,
>something like:
>  function someFunction() {
>      var resolver = cocoon.getComponent(..);
>      var source = resolver.resolveURI(..);
>      // Insert code here that uses source.
>      resolver.release(source);
>  
>

} finally {

>      cocoon.releaseComponent(resolver);
>      cocoon.sendPage(..);
>  }
>
>Where in the docs/javadocs/wiki should all of this go?
>  
>

"Using Components in a Flowscript", does this page exist?

Vadim




Mime
View raw message