Dekel Tsur <[EMAIL PROTECTED]> writes:
| What is the purpose of the StrPool in Menubar_pimpl.C ?
| Can't we use
| fl_addtopup(menu, label.c_str());
| instead of
| fl_addtopup(menu, strpool.add(label)); ?
Eh... no, at least at some point in time tat was not possible.
The string returned by std::string::c_str is invalidated after any
further operations on the std::string. And since fl_addpup only stores
a pointer to the c-string we have to keep it around. That is what we
use the string pool for.
Lgb