What is the difference between these statements
obj=null and obj.dispose()
Answer Posted / sanjeev
obj=null
when we use obj=null then this object has existence in
memory with no any value.
obj.dispose()
when we use obj.dispose() then the clr release the memory
and there are no any existence of that object into the
memory. so it will be better to use obj.dispose()
Note:- By default it is automatically disposed by the clr
when there are no any references in the left
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
What is null in database?
What is yield in c#?
What is the difference between list and arraylist in c#?
What is the function of .IsDescendent()?
Is static class thread safe in c#?
Why do we parse in c#?
What is difference between dictionary and list in c#?
Is null == null c#?
What is default value of decimal c#?
What is clr namespace?
Does c# support templates?
What are jump statements in c#?
What are the delegates in c#?
What does the parsefloat function do?
Can an array be null c#?