Free vertexdecl handles after release.

This commit is contained in:
Branimir Karadžić 2016-03-15 18:58:59 -07:00
parent 61295e1d62
commit 9853b5b8f6
1 changed files with 2 additions and 0 deletions

View File

@ -2269,6 +2269,7 @@ namespace bgfx
VertexDeclHandle declHandle = m_declRef.release(_handle);
if (isValid(declHandle) )
{
m_vertexDeclHandle.free(declHandle.idx);
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyVertexDecl);
cmdbuf.write(declHandle);
}
@ -2561,6 +2562,7 @@ namespace bgfx
VertexDeclHandle declHandle = m_declRef.release(dvb.m_handle);
if (isValid(declHandle) )
{
m_vertexDeclHandle.free(declHandle.idx);
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyVertexDecl);
cmdbuf.write(declHandle);
}