This is a C# .NET Console application. My parent class will instantiate a child class with:
Thread oThread = new Thread(new ParameterizedThreadStart(oAlpha.init));
oThread.Start(this)
oThread will use iDisposable elements.
Under certain conditions (like when I have updated infomration I want oThread to process instead of old/stale information), I'd like the parent to terminate oThread (the child) at any time and restart it. Should I be calling an event handler in the child to Dispose()?
Is there a clean way to do this without having memory leaks?
Any guidance would be appreciated.
Thanks -Ed