Just a quickie, when I PtSetResource a string resource like Pt_ARG_TEXT_STRING I can use a dynamically allocated string, and free it straight away and everything is fine. However if I set the the resource Pt_ARG_TITLE of a PtTerminal in the same way, freeing the memory later causes a segfault, if I don’t free everything works fine but this is going to cause a memory leak (i’m guessing here).
So is it the case that some resources copy the data into themselves so the original data is no longer required, but some widgets use the actual data passed so that data can never be freed until the widget is destroyed?
If this is the case, how can I tell which resources have which behaviour?
Cheers
Garry