Coming from C/C++ a long time ago I still have a habit of ensuring that all resources are cleaned up correctly. I always ensure Dispose is called on IDisposable classes and implement Dispose patterns in my classes containing disposable objects.
However, in my environment I'm more or less the only one doing this. Others just don't understand what I'm doing and think my code is more difficult to understand.
They just create database connections, open streams etc without calling Close or Dispose. Sometimes they set a local or member variable to "Nothing" at the end of a method (guess their background).
My problem is that their code works just as well as mine. Code that over time creates thousands of database connection objects just works.
So, ignoring any arguments about code correctness, following guidelines etc, does IDiposable really matter?
Has anyone actually ran out of resources from not Disposing objects?
Edit: Thanks for all replies. Interesting to see that some people have had problems when not Disposing. It seems to be rare though and I assume the GC/JIT does a good job of keeping resource usage down under normal conditions.
Neither my collegues nor I will change behavior because of this but it feels good to be right.