SIGN IN SIGN UP

Fix bad use of ResourcePool - register disposables to wrapper, not pool class (#290505)

Fixes #290328

The factory methods in CollapsibleListPool and TreePool were registering
disposables (like ResourceLabels and tree container scopes) to the pool
class via this._register() instead of associating them with the pool
item. This meant they would only be disposed when the entire pool was
disposed, not when individual items were cleared.

This copies the correct strategy used by CollapsibleChangesSummaryListPool:
- Create wrapper types (ICollapsibleListWrapper, ITreePoolWrapper)
- Use a local DisposableStore in the factory method
- Return a wrapper with its own dispose() method that cleans up the store
R
Rob Lourens committed
3fc62371e017d5e6d3d742b7aa79832c9fc9e71d
Parent: f520d70
Committed by GitHub <[email protected]> on 1/26/2026, 7:35:56 PM