12.3.1 Type term_t: a reference to a Prolog term
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • Interface Data Types
          • Type term_t: a reference to a Prolog term
            • PL_new_term_ref()
            • PL_new_term_refs()
            • PL_copy_term_ref()
            • PL_reset_term_refs()
            • Interaction with the garbage collector and stack-shifter
    • Packages
Availability:C-language interface function
void PL_reset_term_refs(term_t after)
Destroy all term references that have been created after after, including after itself. Any reference to the invalidated term references after this call results in undefined behaviour.

Note that returning from the foreign context to Prolog will reclaim all references used in the foreign context. This call is only necessary if references are created inside a loop that never exits back to Prolog. See also PL_open_foreign_frame(), PL_close_foreign_frame() and PL_discard_foreign_frame().