summaryrefslogtreecommitdiff
path: root/src/sim/eventq.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/eventq.cc')
-rw-r--r--src/sim/eventq.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sim/eventq.cc b/src/sim/eventq.cc
index 7c2648c64..3e27bcf1c 100644
--- a/src/sim/eventq.cc
+++ b/src/sim/eventq.cc
@@ -227,7 +227,7 @@ EventQueue::serviceOne()
event->process();
if (event->isExitEvent()) {
- assert(!event->flags.isSet(Event::AutoDelete) ||
+ assert(!event->flags.isSet(Event::Managed) ||
!event->flags.isSet(Event::IsMainQueue)); // would be silly
return event;
}
@@ -235,8 +235,7 @@ EventQueue::serviceOne()
event->flags.clear(Event::Squashed);
}
- if (event->flags.isSet(Event::AutoDelete) && !event->scheduled())
- delete event;
+ event->release();
return NULL;
}