This commit is contained in:
mutouyun 2019-01-24 22:27:20 +08:00
parent 64a0c1a5f2
commit 34ea7095d9
2 changed files with 6 additions and 3 deletions

View File

@ -140,7 +140,11 @@ public:
}
/* not virtual */ ~queue_base(void) {
base_t::close(elems_);
if (!this->dismiss_ && (elems_ != nullptr)) {
shm::release(elems_, sizeof(Elems));
}
dismiss_ = true;
// base_t::close(elems_);
}
constexpr elems_t * elems() const noexcept {

View File

@ -338,7 +338,6 @@ void Unit::test_route() {
ipc::route cc { "my-ipc-route" };
for (std::size_t i = 0; i < datas.size(); ++i) {
ipc::buff_t dd = cc.recv();
std::cout << "recv: " << (char*)dd.data() << std::endl;
QCOMPARE(dd.size(), std::strlen(datas[i]) + 1);
QVERIFY(std::memcmp(dd.data(), datas[i], dd.size()) == 0);
}
@ -358,7 +357,7 @@ void Unit::test_route() {
t1.join();
t2.join();
// test_prod_cons<ipc::route, 1, 1>();
test_prod_cons<ipc::route, 1, 1>();
}
void Unit::test_route_rtt() {