dmanhr

dmanhr

  • NA
  • 1
  • 0

Implementing Dispose method - explicit freeing objects

Jul 12 2004 12:51 PM
Hi! I have linked list: class Node{ CNode nextNode; object data; public Node(){} ~Node(){} public void Dispose() { GC.SuppressFinalize(this); } } If I understood text on msdn.com method GC.SuppressFinalize(this) just requests that the system not call the finalizer method for the specified object. So, what should I do/add to Dispose() method that it will explicit (myself not automaticly GC) free class Node? btw: I've already tried explicitly call Finalize(), but i got an error. thanks, dmanhr