Fixed materials leaking memory (constant buffers were not being released)