maybe solve access violation problem with NND2DTexture resource release