-
Notifications
You must be signed in to change notification settings - Fork 536
Resource tracking and destruction #633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Nice! |
|
Looks good so far. |
src/device/handle.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just use an if? this is a bit to tricky.
let free = !(strong_count(v) > 1 || weak_count(v) > 1);
if free { fun(param, v.deref()); }
!freeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, will fix in a moment
|
Looks good. |
|
Is this still blocked? |
|
No, I forgot to change the issue status. It's all ready. Regards,
|
|
Ok, I'll merge! |
Resource tracking and destruction
633: Fix build status badge r=grovesNL a=Gordon-F fix gfx-rs#630 Co-authored-by: Igor Shaposhnik <[email protected]>
Implements automatic management of the resources. Works just like RAII.
Closes #288, #617
User API changes:
factory.delete_something()any more!RendererandFactoryaccept all handles by reference to avoid cloningFactoryworks withRawBuffertype natively now instead ofBuffer<()>device.after_frame()afterglfw.swap_buffers()TODO:
handle::Manager)after_free()