The Generic Purge Caches Action

	#include "ofxCore.h"
	#define kOfxActionPurgeCaches                 "OfxActionPurgeCaches"

  • handle handle to the plug-in instance, cast to an OfxImageEffectHandle
  • inArgs is redundant and is set to NULL,
  • outArgs is redundant and is set to NULL.


The kOfxActionPurgeCaches is an action that may be passed to a plug-in instance from time to time in low memory situations. Instances recieving this action should destroy any data structures they may have and release the associated memory, they can later reconstruct this from the effect's parameter set and associated information.

For Image Effects, it is generally a bad idea to call this after each render, but rather it should be called after kOfxImageEffectActionEndSequenceRender . Some effects, typically those flagged with the kOfxImageEffectInstancePropSequentialRender property, may need to cache information from previously rendered frames to function correctly, or have data structures that are expensive to reconstruct at each frame (eg: a particle system). Ideally, such effect should free such structures during the kOfxImageEffectActionEndSequenceRender action.


  • kOfxActionCreateInstance has been called on the instance handle,

Return Values

  • kOfxStatOK, the action was trapped and all was well
  • kOfxStatReplyDefault, the action was ignored
  • kOfxStatErrFatal,
  • kOfxStatFailed, something went wrong, but no error code appropriate, the plugin should to post a message