fix memory leak, closes #15785

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2013-12-29 19:14:24 +00:00
parent 87eb540094
commit dd4291f962

View File

@@ -46,11 +46,14 @@ class GTKFDIOManager : public wxFDIOManager
public:
virtual int AddInput(wxFDIOHandler *handler, int fd, Direction d)
{
return g_io_add_watch(
g_io_channel_unix_new(fd),
GIOChannel* channel = g_io_channel_unix_new(fd);
unsigned id = g_io_add_watch(
channel,
d == OUTPUT ? G_IO_OUT : G_IO_IN,
wxSocket_Input,
handler);
g_io_channel_unref(channel);
return id;
}
virtual void