MCPcopy Create free account
hub / github.com/NativeScript/android / Clear

Function Clear

test-app/runtime/src/main/cpp/include/cppgc/persistent.h:197–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers 3

~BasicPersistentFunction · 0.70
persistent.hFile · 0.70
ReleaseFunction · 0.70

Calls 1

IsValidFunction · 0.85

Tested by

no test coverage detected