destructor if this crashes, I have a bug because the object was released too early
| 40 | //destructor |
| 41 | //if this crashes, I have a bug because the object was released too early |
| 42 | virtual ~Ref() { |
| 43 | if (!isNull()) { |
| 44 | ptr->release(); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | //copy assignment |
| 49 | Ref<T>& operator=(const Ref<T>& other) { |