forked from bartvdbraak/blender
Fix memleaks in our gtests.
This commit is contained in:
parent
971f9e1c25
commit
6ca6d29e6b
@ -105,8 +105,6 @@ void BLI_covariance_m_vn_ex(
|
||||
const int n, const float *cos_vn, const int nbr_cos_vn, const float *center, const bool use_sample_correction,
|
||||
float *r_covmat)
|
||||
{
|
||||
int i, j, k;
|
||||
|
||||
/* Note about that division: see https://en.wikipedia.org/wiki/Bessel%27s_correction.
|
||||
* In a nutshell, it must be 1 / (n - 1) for 'sample data', and 1 / n for 'population data'...
|
||||
*/
|
||||
@ -123,7 +121,7 @@ void BLI_covariance_m_vn_ex(
|
||||
BLI_task_parallel_range_ex(0, n * n, &data, NULL, 0, covariance_m_vn_ex_task_cb, 0, false);
|
||||
}
|
||||
else {
|
||||
for (k = 0; k < n * n; k++) {
|
||||
for (int k = 0; k < n * n; k++) {
|
||||
covariance_m_vn_ex_task_cb(&data, NULL, k);
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +116,7 @@ static void test_polyfill_topology(
|
||||
EXPECT_EQ(true, ELEM((intptr_t)*p, 1, 2));
|
||||
}
|
||||
|
||||
BLI_edgehashIterator_free(ehi);
|
||||
BLI_edgehash_free(edgehash, NULL);
|
||||
}
|
||||
|
||||
|
@ -116,6 +116,8 @@ TEST(stack, Peek)
|
||||
}
|
||||
|
||||
EXPECT_EQ(BLI_stack_is_empty(stack), true);
|
||||
|
||||
BLI_stack_free(stack);
|
||||
}
|
||||
|
||||
/* Check that clearing the stack leaves in it a correct state. */
|
||||
|
@ -33,4 +33,5 @@ TEST(bmesh_core, BMVertCreate) {
|
||||
EXPECT_FALSE(BM_elem_flag_test((BMElem *)bv3, BM_ELEM_SELECT));
|
||||
EXPECT_EQ(1.5f, BM_elem_float_data_get(&bm->vdata, bv3, CD_PROP_FLT));
|
||||
EXPECT_EQ(3, BM_mesh_elem_count(bm, BM_VERT));
|
||||
BM_mesh_free(bm);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user