Don't free a string that is managed by wxGtkString, that's the whole _point_ of wxGtkString.

While we're at it, lets use it some more.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-10-03 16:01:18 +00:00
parent baa9ebc473
commit e808cf8a0a
7 changed files with 34 additions and 69 deletions

View File

@@ -23,7 +23,7 @@
#include "wx/mstream.h"
#include "wx/uri.h"
#include <gdk/gdk.h>
#include "wx/gtk/private.h"
//-------------------------------------------------------------------------
// global data
@@ -110,10 +110,8 @@ wxDataFormatId wxDataFormat::GetType() const
wxString wxDataFormat::GetId() const
{
gchar* atom_name = gdk_atom_name( m_format );
wxString ret = wxString::FromAscii( atom_name );
g_free(atom_name);
return ret;
wxGtkString atom_name(gdk_atom_name(m_format));
return wxString::FromAscii(atom_name);
}
void wxDataFormat::SetId( NativeFormat format )