Hi, Paul:
I once encountered an issue that the program was blocked in the function FindAutoObject in debug mode. The chance is very rare, so I never see it again. But in runtime, thread running EwProcess() sometimes got blocked. Do you think it's possible the link list was built into a circular one? According to your description, the link list headed by AutoObjects is highly dynamic. It's created and disposed each time garbage collection is done, right?
Thank you.
/* The following function searches in the list of existing auto objects for
an object created from the description aAutoObject. If a corresponding
entry could be found, the function removes it from the list and returns
it. If the entry could not be found, the function returns 0. */
static XAutoObjectEntry* FindAutoObject( const XAutoObject* aAutoObject )
{
XAutoObjectEntry** entry = &AutoObjects;
/* Look for the entry, registered for the object aAutoObject */
while ( *entry )
{
/* The desired entry found? */
if ((*entry)->Origin == aAutoObject )
{
XAutoObjectEntry* tmp = *entry;
*entry = tmp->Next;
return tmp;
}
/* Continue with the next entry in the chain */
else
entry = &((*entry)->Next );
}
return 0;
}
BR.
Stephen