summaryrefslogtreecommitdiff
path: root/src/systemc/core/object.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-07-20 17:18:22 -0700
committerGabe Black <gabeblack@google.com>2018-09-11 21:43:25 +0000
commitbe38309891b4adb91e9a6b56923f1f9e82487e61 (patch)
tree3ac17c2652f12a1debf355c75a0cd94b0bfddaeb /src/systemc/core/object.hh
parentfbf406d0a63ec42ab0ac09788e16eab2a4839230 (diff)
downloadgem5-be38309891b4adb91e9a6b56923f1f9e82487e61.tar.xz
systemc: Fix a couple memory errors.
Because events are held in vectors, it doesn't make sense to keep an iterator into the parent to keep track of where that event is for easy removal since the iterator becomes invalid when the vector is changed. The events need to be stored in a vector because systemc defines an accessor which returns that vector, and building a vector on the fly would be cumbersome. Also, make sure the Event parent pointer is set to nullptr if there isn't a parent. Change-Id: I63a676190e7747e60baaca50009161d47bfc1c54 Reviewed-on: https://gem5-review.googlesource.com/12039 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/object.hh')
-rw-r--r--src/systemc/core/object.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemc/core/object.hh b/src/systemc/core/object.hh
index c87a98b2d..cb759d890 100644
--- a/src/systemc/core/object.hh
+++ b/src/systemc/core/object.hh
@@ -88,7 +88,7 @@ class Object
sc_core::sc_object *sc_obj() { return _sc_obj; }
EventsIt addChildEvent(sc_core::sc_event *e);
- void delChildEvent(EventsIt it);
+ void delChildEvent(sc_core::sc_event *e);
private:
sc_core::sc_object *_sc_obj;