cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Taffelt" <frank.taff...@interface-business.de>
Subject Re: [Flow] Question about return and cocoon.releaseComponent()
Date Thu, 11 Dec 2003 09:28:32 GMT
> My question is:
>
> In this case the finally block is executed or not? As I understand if the
> finally is not executed, then the factory will never be released and it
> will mean a memory leak.

this finally block gets every time evaluated when you leave your try block.
Therefore the component is every time released.

to verify this for yourself - place a print statement inside your block:

<happyhackingmode>
...
finally {
   print("reaching finally block ...");
   cocoon.releaseComponent(factory);
}
...
</happyhackingmode>

Frank


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message