Document that wxString::Clone() is obsolete
It's useless now that we never use ref-counted implementation any longer.
This commit is contained in:
parent
330303e078
commit
5119d35d3b
2 changed files with 5 additions and 9 deletions
|
|
@ -1298,8 +1298,6 @@ public:
|
|||
|
||||
wxString Clone() const
|
||||
{
|
||||
// make a deep copy of the string, i.e. the returned string will have
|
||||
// ref count = 1 with refcounted implementation
|
||||
return wxString::FromImpl(wxStringImpl(m_impl.c_str(), m_impl.length()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1497,14 +1497,12 @@ public:
|
|||
bool Shrink();
|
||||
|
||||
/**
|
||||
Returns a deep copy of the string.
|
||||
Returns a copy of the string.
|
||||
|
||||
That is, the returned string is guaranteed to not share data with this
|
||||
string when using reference-counted wxString implementation.
|
||||
|
||||
This method is primarily useful for passing strings between threads
|
||||
(because wxString is not thread-safe). Unlike creating a copy using
|
||||
@c wxString(c_str()), Clone() handles embedded NULs correctly.
|
||||
This method is obsolete as wxString doesn't use reference-counted
|
||||
implementation any longer and so all string copies are deep and
|
||||
assignment operator or copy constructor can be used instead of this
|
||||
function.
|
||||
|
||||
@since 2.9.0
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue