diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-02-18 14:29:26 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-02-18 14:29:26 -0500 |
commit | 91c48b1c3ba6e46324b96fb76762a4d973ce6007 (patch) | |
tree | 92c691b1ebc702dc5ccdb1f43a647faaa942bc1e /src/cpu/inorder/resource.cc | |
parent | 8b4b4a1ba50a6f422ab75ccf0fb09568f1805ce6 (diff) | |
download | gem5-91c48b1c3ba6e46324b96fb76762a4d973ce6007.tar.xz |
inorder: cleanup in destructors
cleanup hanging pointers and other cruft in the destructors
Diffstat (limited to 'src/cpu/inorder/resource.cc')
-rw-r--r-- | src/cpu/inorder/resource.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc index c371f8244..6a2f5e62a 100644 --- a/src/cpu/inorder/resource.cc +++ b/src/cpu/inorder/resource.cc @@ -53,7 +53,11 @@ Resource::~Resource() delete [] resourceEvent; } - delete deniedReq; + delete deniedReq; + + for (int i = 0; i < width; i++) { + delete reqs[i]; + } } @@ -386,6 +390,7 @@ ResourceRequest::~ResourceRequest() DPRINTF(ResReqCount, "Res. Req %i deleted. resReqCount=%i.\n", reqID, res->cpu->resReqCount); #endif + inst = NULL; } void |