B
BLUE
Since singleton classes conceptually are like static classes, the are
supposed to last for the entire lifetime of the application.
Starting from this point tell me if I'm wrong saying:
- it make no sense to implement IDisposable
- it make sense to implement Finalize if there are unmanaged resources, else
the GC will not be able to free them
- this is perhaps the only case in which a finalizer is implemented, but a
Dispose is not implemented
If I've a thread in a singleton class, before closing the application I have
to wait for thread end (some way telling the thread it should stop as soon
as possible): could this be done into the Closing or Close event handler of
the main form?
Thanks,
Luigi.
supposed to last for the entire lifetime of the application.
Starting from this point tell me if I'm wrong saying:
- it make no sense to implement IDisposable
- it make sense to implement Finalize if there are unmanaged resources, else
the GC will not be able to free them
- this is perhaps the only case in which a finalizer is implemented, but a
Dispose is not implemented
If I've a thread in a singleton class, before closing the application I have
to wait for thread end (some way telling the thread it should stop as soon
as possible): could this be done into the Closing or Close event handler of
the main form?
Thanks,
Luigi.