… | … | ||
---|---|---|---|
110 | struct refcounted | 110 | struct refcounted |
111 | { | 111 | { |
112 | mutable int refcnt; | 112 | mutable int refcnt; |
113 | refcounted () : refcnt (0) { } | 113 | refcounted () : refcnt (0) { } |
114 | void refcnt_inc () { ++refcnt; } | 114 | void refcnt_inc () { ++refcnt; } |
115 | void refcnt_dec () { --refcnt; | 115 | void refcnt_dec () { --refcnt; } |
116 | if (refcnt < 0)abort();}//D | ||
117 | }; | 116 | }; |
118 | 117 | ||
119 | template<class T> | 118 | template<class T> |
120 | struct refptr | 119 | struct refptr |
121 | { | 120 | { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |