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);
      cocoon.releaseComponent(resolver);
      cocoon.sendPage(..);
  }

Where in the docs/javadocs/wiki should all of this go?

--Tim Larson


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

Reply via email to