src/panda/refcnt.cc | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 6 | 6 | 100.0 |
branch | 6 | 8 | 75.0 |
condition | n/a | ||
subroutine | n/a | ||
pod | n/a | ||
total | 12 | 14 | 85.7 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #include "refcnt.h" | ||||||
2 | |||||||
3 | namespace panda { | ||||||
4 | |||||||
5 | 27 | iptr |
|||||
6 | 27 | 100 | if (!_weak) _weak = new weak_storage(); | ||||
50 | |||||||
7 | 27 | return _weak; | |||||
8 | } | ||||||
9 | |||||||
10 | 902 | Refcnt::~Refcnt() { | |||||
11 | 451 | 100 | if (_weak) _weak->valid = false; | ||||
12 | 451 | 50 | } | ||||
13 | |||||||
14 | } |