How do i free objects in C#

Posted by assassin on Stack Overflow See other posts from Stack Overflow or by assassin
Published on 2010-03-09T05:07:51Z Indexed on 2010/03/09 5:21 UTC
Read the original article Hit count: 223

Hi, Can anyone please tell me how I can free objects in C#? For example, I have an object:

Object obj1 = new Object();
//Some code using obj1
//Here I would like to free obj1, after it is no longer required and also more importantly its scope is the full run time of the program.

Thanks for all your help

© Stack Overflow or respective owner

Related posts about c#

Related posts about objects