diff --git a/src/GPUShaderModule.cpp b/src/GPUShaderModule.cpp index 5540db5..10e59cc 100644 --- a/src/GPUShaderModule.cpp +++ b/src/GPUShaderModule.cpp @@ -52,7 +52,7 @@ GPUShaderModule::GPUShaderModule(const Napi::CallbackInfo& info) : Napi::ObjectW spirvDescriptor.code = result.cbegin(); spirvDescriptor.codeSize = static_cast(resultSize); this->instance = wgpuDeviceCreateShaderModule(backendDevice, &descriptor); - delete source; + delete[] source; } // code is 'Uint32Array' else if (code.IsTypedArray()) {