Name

OfxImageEffectSuiteV1::imageMemoryUnlock — Unlock allocated image data

Synopsis

#include "ofxImageEffect.h" 
OfxStatus(*imageMemoryUnlock)(OfxImageMemoryHandlememoryHandle);
 

Arguments

  • memoryHandle -

Description

This function unlocks a previously locked memory handle. Once completely unlocked, memory associated with a memoryHandle is no longer available for use. Attempting to use it results in undefined behaviour.

Note that locks and unlocks nest, and to fully unlock memory you need to match the count of locks placed upon it.

Also note, if you unlock a completely unlocked handle, it has no effect (ie: the lock count can't be negative).

If unlocked, then relocked, the memory associated with a memory handle may be at a different address, however the contents will remain the same.

See also OfxImageEffectSuiteV1::imageMemoryLock and ImageEffectsMemoryAllocation.

Returns

  • kOfxStatOK if the memory was unlocked cleanly,
  • kOfxStatErrBadHandle if the value of memoryHandle was not a valid pointer returned by OfxImageEffectSuiteV1::imageMemoryAlloc, null is placed in returnedPtr