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 on top of this suite.
Public Members
-
OfxStatus (*memoryAlloc)(void *handle, size_t nBytes, void **allocatedData)
Allocate memory.
handle- effect instance to associate with this memory allocation, or NULL.nBytesnumber of bytes to allocateallocatedDatapointer to the return value. Allocated memory will be aligned for any use.
- Return:
kOfxStatOK the memory was successfully allocated
kOfxStatErrMemory the request could not be met and no memory was allocated
-
OfxStatus (*memoryFree)(void *allocatedData)
Frees memory.
allocatedDatapointer to memory previously returned by OfxMemorySuiteV1::memoryAlloc
- Return:
kOfxStatOK the memory was successfully freed
kOfxStatErrBadHandle allocatedData was not a valid pointer returned by OfxMemorySuiteV1::memoryAlloc
-
OfxStatus (*memoryAlloc)(void *handle, size_t nBytes, void **allocatedData)