G
Guest
Perhaps someone can help me understand this. I'm trying to understand what
the IDisposable interface actually does because as far as I can tell it seems
to be just garnish on the plate.
If I create a Dispose method to clean up resources I have to either call it
explicitly or call it in the destructor to make it run. I've tried it both
with and without implementing IDisposable and it doesn't seem to make a
difference to the GC. Either way, my Dispose doesn't seem to get called
unless I have a specific reference to it somewhere in my code. So what's the
point of IDisposable?
the IDisposable interface actually does because as far as I can tell it seems
to be just garnish on the plate.
If I create a Dispose method to clean up resources I have to either call it
explicitly or call it in the destructor to make it run. I've tried it both
with and without implementing IDisposable and it doesn't seem to make a
difference to the GC. Either way, my Dispose doesn't seem to get called
unless I have a specific reference to it somewhere in my code. So what's the
point of IDisposable?