ReconstructMe SDK  2.0.819-89134
Real-time 3D reconstruction engine
 All Classes Files Functions Typedefs Enumerations Enumerator Groups Pages
example_reconstructmesdk_memory_management.cpp

Content

This is an example illustrating basic memory management rules. Boost is only used to generate examples and is not necessary for working with this SDK.

#include <boost/test/unit_test.hpp>
#include <stdio.h>
BOOST_AUTO_TEST_SUITE(example_reconstructmesdk)
BOOST_AUTO_TEST_CASE(memory_management)
{
const char *version_str;
int length;
reme_context_get_version(c, &version_str, &length);
printf("Version running: %s", version_str);
// You must not free/delete version_str
float *mat = (float*)malloc(16 * sizeof(float));
// You are responsible for freeing/deleting in parameters
free(mat);
}
BOOST_AUTO_TEST_SUITE_END()