Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
pseudo_retainable.h
Go to the documentation of this file.
1// Copyright 2018 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef TESTING_PSEUDO_RETAINABLE_H_
6#define TESTING_PSEUDO_RETAINABLE_H_
7
9 public:
10 PseudoRetainable() = default;
11 void Retain() const { ++retain_count_; }
12 void Release() const {
13 if (++release_count_ == retain_count_)
14 alive_ = false;
15 }
16 bool alive() const { return alive_; }
17 int retain_count() const { return retain_count_; }
18 int release_count() const { return release_count_; }
19
20 private:
21 mutable bool alive_ = true;
22 mutable int retain_count_ = 0;
23 mutable int release_count_ = 0;
24};
25
26#endif // TESTING_PSEUDO_RETAINABLE_H_
int release_count() const
PseudoRetainable()=default
int retain_count() const
TEST(FXCRYPT, CryptToBase16)