-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[webgpu] fixes buffer handle leak in cache manager (#23655)
### Description There is a bug in the buffer cache manager that causes a buffer handle leak. When the default GPU device is destroyed, - in native, the underlying buffers are destroyed, but the handle (specifically, the `BaseBuffer` class instance in Dawn) is not released. This may cause small memory leaks. - in WebAssembly, this will cause the buffers to be leaked. Both handle (specifically, the `WGPUBufferImpl` class in emgpu) and memory will be leaked. This change fixes this bug by correctly assigning ownership of the buffers using the C++ wrapper class. Destructors will be correctly called correspondingly.
- Loading branch information
Showing
1 changed file
with
14 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters