Hi,
When editing my flowscript, I notice that there are some components that are used a lot.
Eg:
var resolver = null;
var filesource = null;
try
{
resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);
filesource = resolver.resolveURI(uri);
return filesource.exists();
}
finally
{
if(filesource != null) resolver.release(filesource);
cocoon.releaseComponent(resolver);
}
Is it appropriate to declare these components that are used a lot as global variables? If I do set them globally, how do I release them?
Or are these getComponent/release couples no real threat to slow things down and am I only worried about code duplication?
Kind Regards, Jan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
