I'm hoping i know my facts correctly if not please correct me.
1) You use Dispose to clean unmanaged resources, that means no garbage collection for them.
2) Value types are stored on the stack, reference types are stored on the heap and pointers to reference types are stored on the stack(not really sure about this one but i think it's correct)
3) Finilizers are called by the Garbage Collector.
4) Garbage Collection is called by the CLR and not by the user(although the he can) for reference types, but value types are destroyed(sorry couldn't find a better word) when they go out of scope
I know about the using statement and the way i works but i think it would be a lot easier if the CLR would call Dispose for the user.
So my question is this: "If pointers to reference types are stored on the stack the compiler and the CLR, know when the object goes out of scope. Why does the compiler not generate some IL code that calls Dispose, or why doesn't CLR do that like they do for Finilizers and Destructors".
Sorry if my question is not clear, i'll gladly updated it with any other information you need. Thank you.