We don't have a function like delete_uniform_location unlike all the other tracked resources. So we need to find a way to drop these values automatically.
Instead of the current approach we could either:
use something like Rc<WebGlUniformLocation> for those backends and use ownership semantics and avoid storing in slotmap
track something like Rc<WebGlUniformLocation> inside the slotmap and cleanup any WebGlUniformLocations with a strong_count of 1 whenever get_uniform_location is called
We don't have a function like
delete_uniform_location
unlike all the other tracked resources. So we need to find a way to drop these values automatically.Instead of the current approach we could either:
Rc<WebGlUniformLocation>
for those backends and use ownership semantics and avoid storing in slotmapRc<WebGlUniformLocation>
inside the slotmap and cleanup anyWebGlUniformLocation
s with astrong_count
of1
wheneverget_uniform_location
is called