diff options
author | Jay Berkenbilt <ejb@ql.org> | 2019-08-30 17:58:33 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-08-30 17:58:33 +0200 |
commit | 8c69f8495de1791decff3ae37f1da2383415c144 (patch) | |
tree | fcac238d272d33d24cd0a00e7c9ec553d9865be8 /libtests/pointer_holder.cc | |
parent | 646f3bc0af4f283d72bb0d67966908f74471bef7 (diff) | |
download | qpdf-8c69f8495de1791decff3ae37f1da2383415c144.tar.zst |
Add getRefcount to PointerHolder test
Diffstat (limited to 'libtests/pointer_holder.cc')
-rw-r--r-- | libtests/pointer_holder.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libtests/pointer_holder.cc b/libtests/pointer_holder.cc index c255df5a..05ab4cfa 100644 --- a/libtests/pointer_holder.cc +++ b/libtests/pointer_holder.cc @@ -63,10 +63,14 @@ int main(int argc, char* argv[]) std::cout << "hello" << std::endl; Object* o1 = new Object; ObjectHolder oh1(o1); + std::cout << "oh1 refcount = " << oh1.getRefcount() << std::endl; ObjectHolder oh2(oh1); + std::cout << "oh1 refcount = " << oh1.getRefcount() << std::endl; + std::cout << "oh2 refcount = " << oh2.getRefcount() << std::endl; ObjectHolder oh3(new Object); ObjectHolder oh4; ObjectHolder oh5; + std::cout << "oh5 refcount = " << oh5.getRefcount() << std::endl; if (oh4 == oh5) { std::cout << "nulls equal" << std::endl; |