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/rc.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/driver/rc.cpp') diff --git a/lib/driver/rc.cpp b/lib/driver/rc.cpp index d943352a..c7acd113 100644 --- a/lib/driver/rc.cpp +++ b/lib/driver/rc.cpp @@ -79,7 +79,7 @@ eRCShortDriver::eRCShortDriver(const char *filename): eRCDriver(eRCInput::getIns sn=0; } else { - sn=new eSocketNotifier(eApp, handle, eSocketNotifier::Read); + sn=eSocketNotifier::create(eApp, handle, eSocketNotifier::Read); CONNECT(sn->activated, eRCShortDriver::keyPressed); eRCInput::getInstance()->setFile(handle); } @@ -89,8 +89,6 @@ eRCShortDriver::~eRCShortDriver() { if (handle>=0) close(handle); - if (sn) - delete sn; } void eRCInputEventDriver::keyPressed(int) @@ -115,7 +113,7 @@ eRCInputEventDriver::eRCInputEventDriver(const char *filename): eRCDriver(eRCInp sn=0; } else { - sn=new eSocketNotifier(eApp, handle, eSocketNotifier::Read); + sn=eSocketNotifier::create(eApp, handle, eSocketNotifier::Read); CONNECT(sn->activated, eRCInputEventDriver::keyPressed); eRCInput::getInstance()->setFile(handle); } @@ -133,8 +131,6 @@ eRCInputEventDriver::~eRCInputEventDriver() { if (handle>=0) close(handle); - if (sn) - delete sn; } eRCConfig::eRCConfig() -- cgit v1.2.3