ReconstructMe SDK  2.6.43-0
Real-time 3D reconstruction engine
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 <stdlib.h> /* malloc, free, rand */
#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()