-----Original Message-----
>function doSomething() {
>var comp = cocoon.createComponent(Packages.blabla.myComponent.ROLE);
>var form = new Form("myForm");
>var data = comp.getInfo();
>form.load(data);
>form.show("myForm-template");
>form.save(data);
>comp.saveInfo(data);
>cocoon.releaseComponent(comp);
>cocoon.redirectTo("other-pipeline");
>}
>
>If the "myForm-template" shows a menu and the user selects a menuitem rather
>than the submit box, what happens with the script, the continuation and the
>allocated component? In other words, do I get a memory leak?
Yes you do. In order to prevent that you need to release all your compoments right
before sendPage and sendPageAndWait or call them like this:
cocoon.sendPageAndWait( view, bizData, function(){
cocoon .releaseComponent( aComponent );
}
)
This code invokes thr inlined function right after the view has been rendered (at
least I understand it that way )
--
Leszek Gawron
lgawron<at>mobilebox.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]