Skip to main content

ri_config_free

Function ri_config_free 

Source
#[unsafe(no_mangle)]
pub extern "C" fn ri_config_free(config: *mut CRiConfig)
Expand description

Frees a previously allocated CRiConfig instance.

Releases all memory associated with the configuration including any loaded values, watched files, or internal caches. After this function returns, the pointer becomes invalid.

§Parameters

  • config: Pointer to CRiConfig to free. If NULL, the function returns immediately without error.

§Behavior

The destructor:

  • Clears all configuration values
  • Stops file watchers if active
  • Releases internal caches
  • Invalidates the pointer

§Safety

This function is safe to call with NULL. Calling with a pointer that has already been freed results in undefined behavior.