commit | 4acf4646fbbd6c1893cec5bb700d3c7cd09e4a26 | [log] [tgz] |
---|---|---|
author | Carl Shapiro <cshapiro@google.com> | Tue Jul 26 18:54:13 2011 -0700 |
committer | Carl Shapiro <cshapiro@google.com> | Tue Jul 26 18:54:13 2011 -0700 |
tree | 418ede41fe310dcbb43a1b5a4294527a6f1108cd | |
parent | 2ed144c2b49ae1da6c464d7a1be0062870530802 [diff] |
Clear out the Runtime singleton when destructing a Runtime instance. Change-Id: Ib2c4699d997a33b52aeb3c63d54c325cf276faf7
diff --git a/src/runtime.cc b/src/runtime.cc index eee84cd..f03157f 100644 --- a/src/runtime.cc +++ b/src/runtime.cc
@@ -19,6 +19,9 @@ delete class_linker_; Heap::Destroy(); delete thread_list_; + // TODO: acquire a static mutex on Runtime to avoid racing. + CHECK(instance_ == this); + instance_ = NULL; } void Runtime::Abort(const char* file, int line) {