3 ms·
There are plenty of cases where Disposables are used in non-simple scopes enabled by using statements, and where it is better to call dispose explicitly rather
by seanmcdirmid 9y ago
There are plenty of cases where Disposables are used in non-simple scopes enabled by using statements, and where it is better to call dispose explicitly rather than using an explicit using statement.
- zzalpha 9y agoNo doubt, though I would argue those are the exception rather than the rule... which is why it should be an ignorable warning, preferably requiring a code annotation to turn it off. But it absolutely be something a modern IDE should flag as a potential error (IntelliJ, for example, has whole classes of these types of inspections for Java, Kotlin, etc).
- seanmcdirmid 9y agoIf the false positive rate was even just 1 or 2%, it might be too noisy to warn about. Perhaps an annotation to opt out would be more apt.