4.43.1 Garbage collection
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Memory Management
          • Garbage collection
            • garbage_collect/0
            • garbage_collect_atoms/0
            • garbage_collect_clauses/0
            • set_prolog_gc_thread/1
            • trim_stacks/0
            • set_prolog_stack/2
            • prolog_stack_property/2
    • Packages
Availability:built-in
Sourcegarbage_collect
Invoke the global and trail stack garbage collector. Normally the garbage collector is invoked automatically if necessary. Explicit invocation might be useful to reduce the need for garbage collections in time-critical segments of the code. After the garbage collection trim_stacks/0 is invoked to release the collected memory resources.