How can you clean up objects holding resources from within
the code?
Answers were Sorted based on User's Feedback
The recommended practice is to implement both Finalize as
well as Dispose methods on an object which needs to clean up
unmanaged resources. The Finalize method would serve as a
backup mechanism in the event that the Dispose is never
called. The garbage collector would perform the object
finalization and prevent a permanent leak of the unmanaged
resource.
Is This Answer Correct ? | 4 Yes | 0 No |
To clean up objects holding resources is to make use of
Dispose Method.
Is This Answer Correct ? | 1 Yes | 0 No |
What is garbage collection? How to force garbage collector to run?
what is serilization?
Is it possible to implement an interface to a structure? Is it possible to extend a struct? Is it possible to inherit a class to struct?
9 Answers IBM, Logica CMG, TCS,
What is a cshtml file?
Can u create multiple threads of execution ?
1 Answers IBM, ITC Infotech, UHU,
What do you mean by delegates and explain different types of delegates?
Explain what is the smallest unit of execution in .net?
What is the use of jit ? Jit (just - in - time) is a compiler which converts msil code to
Can constructor have return type c#?
Can you allow class to be inherited, but prevent the method from being over-ridden?
FOR EXAMPLE : CLASS Dotnet { } creating object: Dotnet dn=new Dotnet(); NOW THE QUESTION IS WHICH IS CALLED AS OBJECT ?EITHER dn OR new Dotnet() and CAN YOU PROVE YOUR ANSWER?????PLEASE REPLY...
What is parallel foreach in c#?