If some strings are requested from the GUI and stored, they need to be copied.
char[] str1 = entry1.getText();
char[] str2 = entry2.getText();
This can/will result in corrupted data in str1, because GTK seems to reuse the buffer from the first line. I wonder if the getText() method shall .dup the string by default?
Perhaps it would make sense to offer an additional parameter, but default behaviour does the copy. So both is possible, maximum performance, but by default, the save copy is made.
char[] getText( bool makeCopy = true ){
char[] res = ...;
return makeCopy ? res.dup : res;
}
What you mean?