summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resource.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-02-18 14:29:26 -0500
committerKorey Sewell <ksewell@umich.edu>2011-02-18 14:29:26 -0500
commit91c48b1c3ba6e46324b96fb76762a4d973ce6007 (patch)
tree92c691b1ebc702dc5ccdb1f43a647faaa942bc1e /src/cpu/inorder/resource.cc
parent8b4b4a1ba50a6f422ab75ccf0fb09568f1805ce6 (diff)
downloadgem5-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.cc7
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