V
Vai2000
Hi All, To my correct understanding Garbage Collection works based on
Generation algorithm...(high level).
I have an application which does some heavy operations usually File I/O's. I
want to force garbage collection on this class. I still want the GC to
release all resources before finalizing etc...but I want GC to kick in ASAP,
rather waiting to execute its algo to detect that this class needs cleaning
up and finally come to its rescue...
This is what I have implemented. Please advice
TIA
class Foo:IDisposable
{
public void Dispose()
{
GC.Collect();
}
}
Generation algorithm...(high level).
I have an application which does some heavy operations usually File I/O's. I
want to force garbage collection on this class. I still want the GC to
release all resources before finalizing etc...but I want GC to kick in ASAP,
rather waiting to execute its algo to detect that this class needs cleaning
up and finally come to its rescue...
This is what I have implemented. Please advice
TIA
class Foo:IDisposable
{
public void Dispose()
{
GC.Collect();
}
}