Ask Your Question

Revision history [back]

Memory management using C++ interface

Using the Old C interface I can create static IplImages during initialisation, and just reuse the surfaces across all the executions of my code.

However, the (much nicer) C++ interface doesn't provide this capability. You execute an operation, and you get a different surface as the output.

Is this optimised internally in order to reuse surfaces and this way avoid requiring much more memory, plus allocating and freeing memory per execution of the logic?