Make sure your also taking the same lock object for writes to the list and
reads of the list everywhere it is accessed.
--
William Stacey [MVP]
"vooose" <no****@microsoft.com> wrote in message
news:ui**************@tk2msftngp13.phx.gbl...
| Hi Mark...Thanks for your reply. The actual arraylist is referenced in a
| million different places (give or take :D) - I've gone through all the
| ref's and most simply loop over the arraylist or do trivial functions. I
| do use multi-threading as well and the situation you describe is
| possible but I have a lock on an object prior to addition so no object
| can access it at the same time (obviously this part could be flawed)
|
| I just remembered something else - I had this problem on another
| arraylist that was being accessed by multiple threads...it resulted in
| "unpreditable" behavior - including making some items in the array equal
| to null!
|
| This is probably the issue - just back to debugging how multiple threads
| are accessing the arraylist - what fun!
|
| --
| Wal
|
http://www.vooose.com
|
| *** Sent via Developersdex
http://www.developersdex.com ***