your version of the function is actual. Please note, this function limits to dispose objects which have not been marked in the past.
... doesn't maintain the link list on which it operates when a node in the link list is marked for Garbage Collector
Why should the function does it? The link list is created during the mark phase only. Once the mark phase is finished, the link list is not used anymore. During next mark phase new link list is created.
Do you observe an issue with the actual implementation?
Do you think it's possible the link list was built into a circular one?
This should not happen. However we have observed on a particular HW an issue with the CPU cache causing memory read accesses to return old values in very seldom cases. This was observed exactly with the Link variable. May I ask you what HW are you using?
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?
Some additional few ideas:
1. If you are using threads, please note that no EW related code may be called from other threads. Only the GUI thread is allowed to do this. See also Take care in multi-threading environments.
2. When you access Chora objects or strings from the C code, never store (for later use) the pointers referring the data objects in C variables. See also Don't retain nor modify objects or strings.
The problem here is finally targeted to the function EwGetAutoObject that is called in other thread, as you suggested See also Take care in multi-threading
This issue can be closed. Thank you.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!