G
Guest
An object 'X' is created inside a thread by object 'A'. The functionality of
object 'X' is used only inside that thread. Inside the thread procedure, the
object 'X's methods are called. That object has a Dispose method that needs
to be called.
The Dispose method of object 'X' has to be called finally when the object
'A' is disposed. Is it okay to call the Dispose method of the object 'X'
outside the thread procedure i.e. in the object A's Dispose method which is
in another thread. The thread procedure has exited before the object 'A's
Dispose method is called.
object 'X' is used only inside that thread. Inside the thread procedure, the
object 'X's methods are called. That object has a Dispose method that needs
to be called.
The Dispose method of object 'X' has to be called finally when the object
'A' is disposed. Is it okay to call the Dispose method of the object 'X'
outside the thread procedure i.e. in the object A's Dispose method which is
in another thread. The thread procedure has exited before the object 'A's
Dispose method is called.