Closed thorjelly closed 5 years ago
Thanks for the issue!
The reasons I remember for not doing this initially:
MetaTable
s - we'd need a way to unregister them properlyTrustCell
is more complex; we can't rely that lifetimes resources == lifetime resource (note: this is not used anywhere, but I didn't know if I might want to do that at some point)I'm inclined to add such a method, but it needs some more thinking.
It seems to be desirable to take ownership again of a resource, without needing to wrap that resource in an Option, by removing it from Resources. For example, in my case, gfx::Device requires to be passed ownership of some things to destroy them, such as buffers, which I am using inside of a Resource. It is possible to wrap these in Option and take() them, but because during dispatch these should never be taken and never be None, it seems, though a very minor inconvenience, an unfortunate solution.