Expand description

Managed expressions.

Managed expressions are Wolfram Language expressions created using CreateManagedLibraryExpressionWL, which are associated with a unique Id number that is shared with a loaded library.

Using register_library_expression_manager(), a library can register a callback function, which will recieve a ManagedExpressionEvent each time a new managed expression is created or deallocated.

The managed expression Create(Id) event is typically handled by the library to create an instance of some library data type that is associated with the managed expression. When the managed expression is finally deallocated, a Drop(Id) event is generated, and the library knows it is safe to free the associated data object.

In this way, managed expressions allow memory-management of Rust objects to be performed indirectly based on the lifetime of a Wolfram Language expression.

Enums

Functions

Type Aliases

  • Unique identifier associated with an instance of a managed library expression.