Memory management for Gens on the PARI stack or the heap

class cypari2.stack.DetachGen

Destroy a Gen but keep the GEN which is inside it.

The typical usage is as follows:

  1. Creates the DetachGen object from a :class`Gen`.

  2. Removes all other references to that Gen.

  3. Call the detach method to retrieve the GEN (or a copy of it if the original was not on the stack).