D
Donald Adams
I need to be able to kill an instance of a class in my service should I
really need to. So I have the following code:
private void ServiceStart() {
_csManager=new Cana.Service.Manager();
_tService=new Thread(new ThreadStart(_csManager.Start));
_tService.Name="Manager";
_tService.Start();
}
private void ServiceStop() {
_tService.Abort();
_tService.Join();
_tService=null;
_csManager=null;
}
I create a thread to run my instance of this class so that I can kill it.
When I hit my stop button and step through each line in ServiceStop it
appears to work fine, however, when an event defined in _csManager fires it
keeps going. Doesn't setting my instances to =null destroy those instances,
why are they still running?
Thanks in Advance,
Donald
really need to. So I have the following code:
private void ServiceStart() {
_csManager=new Cana.Service.Manager();
_tService=new Thread(new ThreadStart(_csManager.Start));
_tService.Name="Manager";
_tService.Start();
}
private void ServiceStop() {
_tService.Abort();
_tService.Join();
_tService=null;
_csManager=null;
}
I create a thread to run my instance of this class so that I can kill it.
When I hit my stop button and step through each line in ServiceStop it
appears to work fine, however, when an event defined in _csManager fires it
keeps going. Doesn't setting my instances to =null destroy those instances,
why are they still running?
Thanks in Advance,
Donald