OfxImageEffectSuiteV1::imageMemoryAlloc — Allocate memory from the host's image memory pool


#include "ofxImageEffect.h" 
OfxStatus (*imageMemoryAlloc) ( OfxImageEffectHandle instanceHandle ,
  size_t nBytes ,
  OfxImageMemoryHandle * memoryHandle ) ;


  • instanceHandle - effect instance to associate with this memory allocation, may be NULL.
  • nBytes - the number of bytes to allocate
  • memoryHandle - pointer to the memory handle where a return value is placed


Memory handles allocated by this should be freed by OfxImageEffectSuiteV1::imageMemoryFree . To access the memory behind the handle you need to call OfxImageEffectSuiteV1::imageMemoryLock .

See ImageEffectsMemoryAllocation .


  • kOfxStatOK if all went well, a valid memory handle is placed in memoryHandle
  • kOfxStatErrBadHandle if instanceHandle is not valid, memoryHandle is set to NULL
  • kOfxStatErrMemory if there was not enough memory to satisfy the call, memoryHandle is set to NULL