Hi! Is there a description of the expected lifecycle of items in FAR dialogs? What I mean is:
At some time, I build an array of FarDialogItems and call DialogInit with this array. The function builds the dialog and returns a Handle, which I can use to display the dialog and later to free the dialog using DialogFree. That's clear.
What is not clear is the array of FarDialogItems. Once DialogInit completes, do I still need that array of can I free it? Currently, I am assuming that I need to keep that array, but that leads to quite a complicated code, so if I don't need to array, I would like to know about it so that I could get rid of the code.
Incidentally, very much the same question applies to other structures, too. When can I free the structures used in GetGlobalInfoW or GetPluginInfoW?
Dialog items lifecycle
- DrKnS
- Posts: 6114
- Joined: Thu 04 Aug, 2005 06:44
- Location: Kyiv
- Has thanked: 12 times
- Been thanked: 426 times
Dialog items lifecycle
No.
Rule of thumb: if a function wants a pointer to your data, the data should remain valid at least until the next call of the function, even better until ExitFARW, even better always.When can I free the structures used in GetGlobalInfoW or GetPluginInfoW?