WebGPU: Expect release after destroy. (#3557)

This commit is contained in:
Branimir Karadžić
2026-01-19 11:30:11 -08:00
committed by GitHub
parent 780ef58e97
commit 9ca7782405

View File

@@ -519,12 +519,13 @@ WGPU_IMPORT
#undef WGPU_RELEASE_FUNC
#define WGPU_DESTROY_FUNC(_name) \
#define WGPU_DESTROY_FUNC(_name) \
inline void wgpuDestroy(WGPU##_name& _obj) \
{ \
if (NULL != _obj) \
{ \
wgpu##_name##Destroy(_obj); \
wgpu##_name##Release(_obj); \
_obj = NULL; \
} \
}