a rather quick question, I am starting on implementing rendering with deferred context into my game engine, and came across a heavy memory leak when recording command lists on my deferred contexts. Because every frame I would go like this: DeferredContext[THREAD]->FinishCommandList( 0,&commandLists[THREAD] ), it would eat up RAM, so I Release them every time, like:
if(commandLists[THREAD]){ commandLists[THREAD]->Release(); commandLists[THREAD] = NULL; } I previously only released objects when they wouldn't be used any more, so I thought there would be a more optimized way of handling this? (Like mapping dynamic *ID3D11Buffers for example?)
FinishCommandList. It should not be necessary (nor is it advisable) to release and recreate the deferred contexts every frame. You do need to release theID3D11CommandLists each frame after executing them, though. \$\endgroup\$