0

I am using a DLL that is being used in VB6 and the object is destroyed with oDPID = nothing I'm doing this in C# and I do get results expect ..

fun()
{
    var oDPID = new DPID.Generator();
    Call oDPID.DoThis();
}

If you run this code a number of times without destroying the object, I'll have memory problem How do I destroy the Object when I'm done with it?

nbanic
  • 1,270
  • 1
  • 8
  • 11
SAEED
  • 79
  • 1
  • 7
  • 1
    You don't. Garbage collector does it. More information http://stackoverflow.com/questions/1987251/manually-destroy-c-sharp-objects – kaman May 09 '14 at 05:27
  • Not the Case....... running that after n number of times hogs the system. – SAEED May 09 '14 at 05:44
  • Is this an unmanaged object? Does it implement IDisposable? – Rhys Bevilaqua May 09 '14 at 06:03
  • I think it is . After typing dot next to the object it only provides me a list of Append , Equals,Get,GetTYpe and ToString no destructors coming up. – SAEED May 09 '14 at 06:26

0 Answers0