X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/03b35a9a1bd1f583e32b27d260b223a0989d6c75..06282fd37814c4a9d53bca089b048709b368f5b3:/lock_tester.cc diff --git a/lock_tester.cc b/lock_tester.cc index 7143401..58e691f 100644 --- a/lock_tester.cc +++ b/lock_tester.cc @@ -5,13 +5,14 @@ #include "lock_client.h" #include #include +#include "handle.h" char log_thread_prefix = 'c'; // must be >= 2 const int nt = 6; //XXX: lab1's rpc handlers are blocking. Since rpcs uses a thread pool of 10 threads, we cannot test more than 10 blocking rpc. static string dst; -static lock_client **lc = new lock_client * [nt]; +static lock_client *lc[nt]; static lock_protocol::lockid_t a = "1"; static lock_protocol::lockid_t b = "2"; static lock_protocol::lockid_t c = "3"; @@ -180,4 +181,11 @@ main(int argc, char *argv[]) LOG_NONMEMBER << argv[0] << ": passed all tests successfully"; + for (int i = 0; i < nt; i++) + delete lc[i]; + + handle::shutdown(); + poll_mgr::shared_mgr.shutdown(); + + LOG_NONMEMBER << argv[0] << ": clean-up complete"; }