Decrement the reference count. If the reference count hits 0, the object is destroyed. */
| 35 | Decrement the reference count. If the reference count hits 0, the object is destroyed. |
| 36 | */ |
| 37 | void release() { |
| 38 | --refcount; |
| 39 | if (refcount == 0) { |
| 40 | delete this; |
| 41 | return; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | Get a safe non-owning reference to the current object |