Resolve cycles in wgpu-core using weak references #5120
Labels
kind: refactor
Making existing function faster or nicer
type: enhancement
New feature or request
type: tracking
At the moment the device has string reference to the resources and the resources have strong references to the device. This cycle is manually broken in
triage_suspected
by looking at the reference count.We want to remove this manual reference count management and only rely on weak refst to break the cycles.
@cwfitzgerald put together a diagram that illustrates the end result:
The text was updated successfully, but these errors were encountered: