Hi friends,
I am little bit confused about dispose,finalize concepts...can anybody clarify these two concepts....
Printable View
Hi friends,
I am little bit confused about dispose,finalize concepts...can anybody clarify these two concepts....
[QUOTE=vikasvaidya;25790]Few quick points on Finalize() and Dispose() in C#:
1. Finalize() is the C# equivalent of destructor ~Object() syntax in C#. In VB.Net you implement the Finalize() by overriding it. But, in C# the compiler translates the destructor to a Finalize() method.
2. Finalize() can NOT be overridden or called in C#.
3. Since, Finalize() is called by the Garbage Collector, it is non-deterministic.
4. Dispose() has to be implemented in classes implementing IDispose interface.
5. Its the right place for freeing-up unmanaged resources like file, handles, and connections etc.
6. Dispose() method is called explicitely in the code itself.
7. Dispose() method is automatically called (for objects which implement IDispose), when used in a "using" statement.
Still hungry..... http:// forums . asp . net/p/466400/593963 . aspx#593963
----V V----
Regards,
Vikas Vaidya[/QUOTE]
This is reply of vikasvaidya to the previous question. Both the threads are moved to proper forum.
[QUOTE=debasisdas;25850]This is reply of vikasvaidya to the previous question. Both the threads are moved to proper forum.[/QUOTE]
Thanks allot vidya for clarifying the dipose and finalize.........
plz let me know diff between public assembly and satilite assembly....