There have been number of blogs, SO questions telling you how to know if the object is already disposed. E.g. using IsDisposed property available with some classes.
I want to know:
- Assuming
IsDisposedis returningtrue, if the object is already disposed, how come we are allowed to call aIsDisposedproperty on it? - If we can access its property, how can we say that object is dead or thrown away or disposed? (Are you not referencing it by calling its property?!)
UPDATE # 1:
I have follow up questions after couple of answers stating that "Disposed does not mean object is dead; it just means that any unnanaged resources it's holding are freed up.":
- Does that mean that
Disposedis not saying thatthisobject is disposed? - If the
Disposedobject itself is not dead, why do we getObjectDisposedException? (Does not it mean that this object cannot be used any longer? )