yep that was the problem, thanks guys.
Why i used the list in the first place. I thought it would be a good idea to keep the deleted records in a separate list so i wouldn't have to set its
String[] to null. I wanted to be able write the record back to the file on shutdown (with is valid flag set to 1). However a simple change to just write the valid flag bit when a record has been deleted solves this.
Roel, i tried the tests you mentioned earlier, running with 2500 iterations and things are looking
alot better, only difference being in the second
test
with deleting a record with index between 0 and 50: total number of records at the end was 49 (sometimes a delete fails because the record does not exist, so new records are just added)
In my case the number of records at the end is higher. cheers