From: Dom Lachowicz (domlachowicz_at_yahoo.com)
Date: Fri Apr 09 2004 - 08:55:10 EDT
Hi Tomas,
> 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.
You saw the problem, but didn't see the right
solution. Having static vars inside of getValue() and
getValueUTF8() is nasty. If the menus need to keep
string references around longer, then the problem is
in the menu code, not XAP_String.
> This needs to be backported.
Please don't. This needs to be reverted and rethought.
Best regards,
Dom
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
This archive was generated by hypermail 2.1.4 : Fri Apr 09 2004 - 08:57:17 EDT