| 195 | } |
| 196 | |
| 197 | void Clear() { |
| 198 | // Simplified version of `Assign()` to allow calling without a complete type |
| 199 | // `T`. |
| 200 | if (IsValid()) { |
| 201 | WeaknessPolicy::GetPersistentRegion(GetValue()).FreeNode(GetNode()); |
| 202 | SetNode(nullptr); |
| 203 | } |
| 204 | SetValue(nullptr); |
| 205 | } |
| 206 | |
| 207 | T* Release() { |
| 208 | T* result = Get(); |
no test coverage detected