TuttleOFX  1
OfxMemorySuiteV1 Struct Reference

The OFX suite that implements general purpose memory management. More...

#include <ofxMemory.h>

Data Fields

OfxStatus(* memoryAlloc )(void *handle, size_t nBytes, void **allocatedData)
 Allocate memory.
OfxStatus(* memoryFree )(void *allocatedData)
 Frees memory.

Detailed Description

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.

Definition at line 51 of file ofxMemory.h.


Field Documentation

OfxStatus( * OfxMemorySuiteV1::memoryAlloc)(void *handle, size_t nBytes, void **allocatedData)

Allocate memory.

  • handle - effect instance to assosciate with this memory allocation, or NULL.
  • nBytes - the number of bytes to allocate
  • allocatedData - a pointer to the return value. Allocated memory will be alligned for any use.

This function has the host allocate memory using it's own memory resources and returns that to the plugin.

Returns:

Definition at line 67 of file ofxMemory.h.

Referenced by OFX::memory::allocate().

OfxStatus( * OfxMemorySuiteV1::memoryFree)(void *allocatedData)

Frees memory.

This function frees any memory that was previously allocated via OfxMemorySuiteV1::memoryAlloc.

Returns:

Definition at line 82 of file ofxMemory.h.

Referenced by OFX::memory::free().


The documentation for this struct was generated from the following file: