, , - . : (1) , ; (2) , (-), , . , , , , , , . , , , .
, , . , , , . Unsubscription, , , . , , , Interlocked.CompareExchange, , .
Note. btw: If the first object contains a link to the second object, the latter will be guaranteed to exist when the finalizer for the first object is launched, but it will not be guaranteed to be in any specific state. The cleanup thread should not try to do anything with it except to unsubscribe.
source
share