Fixed ptex cache resource release sequence.