You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some places (eg. gfxBindBufferMemory) we create a zeroed type of the backend type and mem::replace it. If the backend type has a Drop impl rust will try to drop this zeroed type which might lead to bad things.
I'm not really sure what the intent of the mem::replace call is, does anyone know?
The text was updated successfully, but these errors were encountered:
I think the reason for mem::replace is that we need to move the Unbound buffer out and then get the bound buffer to put back in. Without replace you can either de-reference or unbox, which is not useful here.
But overall, we should totally not drop random zeroed content ;)
In some places (eg.
gfxBindBufferMemory
) we create a zeroed type of the backend type andmem::replace
it. If the backend type has aDrop
impl rust will try to drop this zeroed type which might lead to bad things.I'm not really sure what the intent of the
mem::replace
call is, does anyone know?The text was updated successfully, but these errors were encountered: