VB Thread refresh

Hi, I made an application in VB.NET, this application has a thread that constantly seeks documents and validates their status to perform some operations on them. The problem is that when the status of a document changes, the thread does not look at the change.

Spontaneously, the thread can see the changes, sometimes in few minutes and somethimes several hours later.

I have tried many solutions, but none works.

any idea?

Thanks.

Subject: Solved **

The problem was the VB garbage collector. It needed to be explicitly invoked after objects destruction:

NotesCol_MyCollection = Nothing

NotesDoc_MyDocument = Nothing

System.GC.Collect()