[
https://issues.apache.org/jira/browse/SLING-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger resolved SLING-333.
-------------------------------------
Resolution: Won't Fix
Looking back at the discussion and reconsidering, I don't think we really needs
such a generalized cleanup functionality. Each piece of code should care to
cleanup up behind itself.
> Implement object cleanup mechanism
> ----------------------------------
>
> Key: SLING-333
> URL: https://issues.apache.org/jira/browse/SLING-333
> Project: Sling
> Issue Type: New Feature
> Components: Engine
> Reporter: Felix Meschberger
>
> In a message on the dev list [1] Bertrand stipulated a cleanup feature along
> these lines:
> I'm talking about *automatic* cleanup of such objects at the end of a
> request, scenario:
> 1. Object A calls a method M of class C, that creates something that must be
> cleaned up (ThreadLocal variable for example)
> 2. Before returning, Method M registers itself to be called for cleanup at
> the end of request processing
> 3. Object A doesn't have to care about cleanup, it will happen automatically.
> This is much more foolproof than requiring A to call cleanup explicitely,
> hence my suggestion to implement a general (request-scope for now) cleanup
> mechanism.
> [1] http://markmail.org/message/eeilivxyrm7s5z42
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.