C
C#5mo ago
br4kejet

Is there a name for this type of code/system?

I couldn't think of a better title, but the system I'm talking about is IntelliJ IDEA's Disposer system (I imagine Rider uses it too). If you don't know what it is, it has a central manager class that manages a tree of disposable object, and when you dispose of an object, it first disposes all children before finally disposing the object itself. The disposable objects themselves don't actually store any child disposable objects; the manager class stores it in that tree (application wide), so it's very easy to use and implement new disposable objects. I really want to look up more info about systems similar to this like some sort of "deferred node tree", but I don't know where to begin researching it
2 Replies
br4kejet
br4kejet5mo ago
The closest thing I can think of is traits
matkoch
matkoch5mo ago
fyi, this is the documentation for how it works in resharper sdk: https://www.jetbrains.com/help/resharper/sdk/Lifetime.html
ReSharper Platform SDK Help
Lifetime | ReSharper Platform SDK