Implement object cleanup mechanism
----------------------------------

                 Key: SLING-333
                 URL: https://issues.apache.org/jira/browse/SLING-333
             Project: Sling
          Issue Type: New Feature
            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.

Reply via email to