Actually the GC will still free such objects if Close() isn't called (because they are no longer referenced anywhere in the program). However as the GC could take hours to come along...... the consequences are obvious. So yeah, always call Close() if the class' documentation suggests to do so.Dr_Evil said:don't forget to close ADO objects (datareader, connection) after using them, otherwise they can't be freed by the garbage collector.
anything else the GC will collect when it's no longer in use.
NathanE said:Actually the GC will still free such objects if Close() isn't called (because they are no longer referenced anywhere in the program). However as the GC could take hours to come along...... the consequences are obvious. So yeah, always call Close() if the class' documentation suggests to do so.