LibraryLink`
LibraryLink`

registerLibraryExpressionManager (C Function)

is a library callback function that registers a library expression manager name mgr with the function manageFun.

Details

  • Used in C/C++ code in a library function called from the Wolfram Language, typically in library initialization functions WolframLibrary_initialize.
  • A nonzero error code value will be returned if manager mgr is already registered.
  • The function specified by manageFun will be called with mode 0 and a positive integer id when expr=CreateManagedLibraryExpression[mgr,] is evaluated.
  • The function specified by manageFun will be called with mode 1 and the positive integer id associated with expr when there are no longer any references to expr, or the callback function releaseManagedLibraryExpression is called.