Before quitting, call SetTexture with ByVal 0 for the texture to remove the one being used from memory, for each of the textures you are blending, that may be the problem.

Z.