3 ms·
The drop function being talked about here is the one I pointed to, not the one you pointed to. The Drop trait is built into the language (as a lang item), std::
by steveklabnik 1y ago
The drop function being talked about here is the one I pointed to, not the one you pointed to. The Drop trait is built into the language (as a lang item), std::mem::drop is just a regular old function.
- codedokode 1y agoThe drop that you mention doesn't free memory, as I understand, it is called before actually destroying object's memory.
- steveklabnik 1y agoNot inherently, sure. But ultimately this is far afield of what I was trying to say, which is that the signature being discussed of being changed from &mut T to &owned T is the one from the Drop trait. That’s it.