The life cycle of objects on the graph coincides with the life cycle of the graph itself. As soon as the graph receives garbage collection, so are all objects inside the graph.
I do this by creating subgraphs in a dagger. Subgraphite will contain all objects (single points inside this graph) that require a shorter life cycle. System-wide objects fall into the main schedule, on which the subgraph depends.
PS. I am not familiar with Spring, so I cannot explain how this relates to Spring.
source share