4 ms·
The dispose pattern puts the work on the user of the resource. In addition I have seen cases of classes that didn't need to be disposable but later changes were
by maxxxxx 9y ago
The dispose pattern puts the work on the user of the resource. In addition I have seen cases of classes that didn't need to be disposable but later changes were made that required them to be disposable. Now you have code using these classes that don't dispose them.
I much prefer destructors like in C++ (or VB or even PHP) that run when the reference count goes to 0.