Re: iup memory leak - ping ghaberek
- Posted by petelomax Mar 14, 2016
- 1388 views
ghaberek said...
Did you write this by hand or did you adapt my wrapper?
By hand. Bit of a slog but I probably spend ten times as long writing the docs as each function.
ghaberek said...
I didn't realize there were separate functions for setting string attributes. I can adapt the wrapper accordingly. Thanks for the heads up.
IupSetAttribute can store handles etc, or pointers to strings, which must therefore persist for the duration.
IupSetStrAttribute can only store strings, and makes an internal copy, so the app can bin 'em.
It would probably be fine for iup.e to use IupSetStrAttribute (internally) for all strings and IupSetAttribute for any atoms; I doubt the extra overhead of that internal duplication would be noticed very often if at all.
Pete