… | |
… | |
174 | MTH void refcnt_inc () const { ++refcnt; } |
174 | MTH void refcnt_inc () const { ++refcnt; } |
175 | MTH void refcnt_dec () const { --refcnt; } |
175 | MTH void refcnt_dec () const { --refcnt; } |
176 | |
176 | |
177 | MTH int refcnt_cnt () const; |
177 | MTH int refcnt_cnt () const; |
178 | // check wether the object has died and destroy |
178 | // check wether the object has died and destroy |
179 | MTH void refcnt_chk () { if (refcnt <= 0) do_check (); } |
179 | MTH void refcnt_chk () { if (expect_false (refcnt <= 0)) do_check (); } |
180 | |
180 | |
181 | // destroy the object unless it was already destroyed |
181 | // destroy the object unless it was already destroyed |
182 | // this politely asks everybody interested the reduce |
182 | // this politely asks everybody interested the reduce |
183 | // the refcount to 0 as soon as possible. |
183 | // the refcount to 0 as soon as possible. |
184 | MTH void destroy (); |
184 | MTH void destroy (); |