OfxMemorySuiteV1

struct OfxMemorySuiteV1

The OFX suite that implements general purpose memory management.

Use this suite for ordinary memory management functions, where you would normally use malloc/free or new/delete on ordinary objects.

For images, you should use the memory allocation functions in the image effect suite, as many hosts have specific image memory pools.

Note

C++ plugin developers will need to redefine new and delete as skins ontop of this suite.

Public Members

OfxStatus (*memoryAlloc)(void *handle, size_t nBytes, void **allocatedData)

Allocate memory.

  • handle - effect instance to assosciate with this memory allocation, or NULL.

  • nBytes number of bytes to allocate

  • allocatedData pointer to the return value. Allocated memory will be alligned for any use.

This function has the host allocate memory using its own memory resources and returns that to the plugin.

Return:

OfxStatus (*memoryFree)(void *allocatedData)

Frees memory.

This function frees any memory that was previously allocated via OfxMemorySuiteV1::memoryAlloc.

Return: