Cysharp / Cysharp/ObservableCollections
Clear method prevents collections of IDisposable items.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1k
- Forks
- 73
- Avg merge
- 5d 4h
- Merged PRs (30d)
- 2
Description
Currently, when using an ObservableCollection to store items which implement IDisposable, it is impossible to observe the collection to ensure item disposal. If the 'Clear' method is called, there is no way for an observer to get a reference to the items previously in the list in order to dispose them. Ideally, when clear is called, the list of old items should be available.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the ObservableCollection Clear entry point and its observer notification path, then inspect how collection changes are currently exposed. Done means an observer can access the items removed by Clear, allowing IDisposable items to be disposed reliably; verify the behavior with the existing collection tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100