Minor clarification

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-04-29 09:53:36 +00:00
parent 1c13f06e4e
commit 36a2d2c43e
2 changed files with 5 additions and 5 deletions

View File

@@ -292,12 +292,12 @@ public:
@code
void FunctionInAWorkerThread(const wxString& str)
{
wxCommandEvent * const e = new wxCommandEvent;
wxCommandEvent* evt = new wxCommandEvent;
// NOT e->SetString(str) as this would be a shallow copy
e->SetString(str.c_str()); // make a deep copy
// NOT evt->SetString(str) as this would be a shallow copy
evt->SetString(str.c_str()); // make a deep copy
wxTheApp->QueueEvent(new wxCommandEvent
wxTheApp->QueueEvent( evt );
}
@endcode