Hello,
the provided documentation demonstrates the recommended approach how to exchange strings or any other data between GUI and target system. If you are looking for more low-level functionality, these is documented in the header files of RTE (Runtime Environment). In particular the file ewrte.h contains all data structures and functions inclusive the description.
The usage of not officially documented functionality is however not the recommended way. We feel free to change, remove or add new functionality in the future causing your implementation to eventually fail when you go to a newer Embedded Wizard version. Only the oficially documented parts are stable.
Generally, all dynamicaly reserved memory (for Chora objects, strings, resources, etc.) is managed by Embedded Wizard own Garbage Collection. You don't need to worry about it as long as you follow the sugestions in the provided documentation.
When working with list views, the view loads its contents (the items) dynamically just in the moment when the user scrolls the list. Even if you have millions of list items, the list view will maintain only few items in the memory. You don't need to worry about it. Just implement the OnLoad slot method to feed the view with the actually requested item contents.
In the simple case, the implementation of OnLoad calls your 'C' functions to get the data (strings) for the just loaded item. The returned strnigs have to be created by using one of the documented EwNewStringXXX() functions (e.g. EwNewStringAnsi()). As long the string is needed in the running application (e.g. it is visible in the list view), the memory for the string is occupied. As soon as the user has scrolled the list and new strings are loaded, the old strings are released automatically. There is no explicit free or delete function.
The recommended approach is to implement in your Driver Class a method to serve as interface to your device where the many strings are maneged. The following could be the declaration of such method:
string GetItemContent( int32 aItemNo, int32 aFieldNo ).
The OnLoad slot method can then call GetItemContent() with the the number of the just requested list item passed in the first argument and the part of the item (the field number) in the second argument. The implementation of GetItemContent() should contain native statements to call your particular 'C' functions to obtain the requested information as Embedded Wizard strings.
In your question you are speaking about the array. Is your intention to use the array as a kind of cache? If yes, it is not necessary. The list view maintains its own item cache. Just ensure, that the 'C' function in your device are fast to provide the requested information quickly and maintain the implementation of the method GetItemContent() and OnLoad as simple as possible.
Does it help you?
Best regards
Paul Banach