GC will run automatically every few minutes or if memory is low. You can run
it manually by calling GC.Collect() but this is generally not recommended.
GC will collect all objects automatically which are not referenced from
somewhere.
If you want to destroy an object set all references to it to null and remove
the objects from all lists or arrays if you store your object in such a
collection.
--
cody
Freeware Tools, Games and Humour
http://www.deutronium.de.vu || http://www.deutronium.tk
> Hi
>
> I am writing a chat application
> I have developed the chat server in which i am creating objects that represents the communicating parties and those will stay in memory till
there is communication between them
> when they logout i need to destroy the object from the memory
>
[quoted text clipped - 9 lines]
> Thanks
> Shiva