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 allocateallocatedData
pointer to the return value. Allocated memory will be alligned for any use.
- Return:
kOfxStatOK the memory was sucessfully allocated
kOfxStatErrMemory the request could not be met and no memory was allocated
-
OfxStatus (*memoryFree)(void *allocatedData)
Frees memory.
allocatedData
pointer to memory previously returned by OfxMemorySuiteV1::memoryAlloc
- Return:
kOfxStatOK the memory was sucessfully freed
kOfxStatErrBadHandle allocatedData was not a valid pointer returned by OfxMemorySuiteV1::memoryAlloc
-
OfxStatus (*memoryAlloc)(void *handle, size_t nBytes, void **allocatedData)