llama_free_context: Free an inference context

View source: R/llama.R

llama_free_contextR Documentation

Free an inference context

Description

Free an inference context

Usage

llama_free_context(ctx)

Arguments

ctx

Context handle returned by [llama_new_context]

Value

No return value, called for side effects. Releases the memory associated with the inference context.

Examples

## Not run: 
model <- llama_load_model("model.gguf")
ctx <- llama_new_context(model)
# ... use context ...
llama_free_context(ctx)

## End(Not run)

llamaR documentation built on May 28, 2026, 1:06 a.m.