From 10e7e45ae92d4fe06f70126ed256b87896dbc432 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Wed, 29 Oct 2008 19:46:57 +0000 Subject: better solution to add possibility to delete eSocketNotifiers, eConsoleAppContainers in callback funktions without crash --- lib/driver/avswitch.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/driver/avswitch.cpp') diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp index 1f2765ec..dbfebf5f 100644 --- a/lib/driver/avswitch.cpp +++ b/lib/driver/avswitch.cpp @@ -24,7 +24,7 @@ eAVSwitch::eAVSwitch() } else { - m_fp_notifier = new eSocketNotifier(eApp, m_fp_fd, eSocketNotifier::Read|POLLERR); + m_fp_notifier = eSocketNotifier::create(eApp, m_fp_fd, eSocketNotifier::Read|POLLERR); CONNECT(m_fp_notifier->activated, eAVSwitch::fp_event); } } @@ -93,8 +93,6 @@ eAVSwitch::~eAVSwitch() { if ( m_fp_fd >= 0 ) close(m_fp_fd); - if (m_fp_notifier) - delete m_fp_notifier; } eAVSwitch *eAVSwitch::getInstance() -- cgit v1.2.3