L.S., I have a question on weak referencing and garbage collection.
Let's say I have an object reference A. The object A is referring to, A*, itsself holds a reference B to another object, B*. A is the only reference to A*, B is the only reference to B*. Now I use A to obtain a weak reference W to A* and I let A go out of scope. Later on, I use W to obtain B* via A*. If a garbage collection was performed after A went out of scope, but before I issue W to obtain A*, it is likely that A*, B and B* were cleaned up. Then, W would reference a null value and I would know that me getting through B* via A* is not going to happen. But -- garbage collection is quite undeterministic. So, here's my question. Is it possible that garbage collection cleans up B* while it leaves alone A*? Because in that case, when I issue W and neatly retrieve A*, I would be unpleasantly surprised when I follow B and find B* cleaned up. In practice I have not encountered this problem and I'm quite sure that it won't happen. But what I really like to know is, if there are specifications that prevent a neat implementation of garbage collection and weak referencing to cause these kinds of nastly situations. Who can provide me with more information on this subject? Yours sincerly, Stefan Holdermans <[EMAIL PROTECTED]> You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.