detaching texture from buffer

there used to be a function detachTexture in previous version of panda.
in panda 9 there is no such function.

how shd i go about this. i am trying to take pictures in the scene.

The “motion trails” sample program copies the scene into a texture. Take a look at that.