From: Tomas Frydrych (tomasfrydrych_at_yahoo.co.uk)
Date: Fri Apr 09 2004 - 03:20:12 EDT
I have changed XAP_StringSet::getValue(XAP_String_Id id, const char *
inEncoding) and getValueUTF8(XAP_String_Id id) to return references.
The problem with returning UT_String and UT_UTF8String rather than
UT_String & and UT_UTF8String & is that the temporary variable the
compiler creates on return has an uncertain life-span. I was getting
SIGSEGV on win32 when synthesizing menus because the variable was
destroyed too early. I suspect when returning classes, this should
mostly be done by reference, not by copy.
This needs to be backported.
files: xap_Stringsh/cpp
Tomas
This archive was generated by hypermail 2.1.4 : Fri Apr 09 2004 - 03:22:15 EDT