unsigned int GetRowCount();
 
     wxDataViewItem GetSelection() const;
-    wxDataViewSelection GetSelections(){ return m_selection; }
+    const wxDataViewSelection& GetSelections() const { return m_selection; }
     void SetSelections( const wxDataViewSelection & sel )
         { m_selection = sel; UpdateDisplay(); }
     void Select( const wxArrayInt& aSelections );
 int wxDataViewCtrl::GetSelections( wxDataViewItemArray & sel ) const
 {
     sel.Empty();
-    wxDataViewSelection selection = m_clientArea->GetSelections();
+    const wxDataViewSelection& selections = m_clientArea->GetSelections();
 
-    const size_t len = selection.size();
+    const size_t len = selections.size();
     for ( size_t i = 0; i < len; i++ )
     {
-        wxDataViewItem item = m_clientArea->GetItemByRow(selection[i]);
+        wxDataViewItem item = m_clientArea->GetItemByRow(selections[i]);
         if ( item.IsOk() )
         {
             sel.Add(item);