fixed memory leaks

This commit is contained in:
2022-10-24 15:59:01 +06:00
parent 4222c3ebf6
commit bbeb6bea1d
11 changed files with 50 additions and 6 deletions

View File

@@ -8,13 +8,15 @@
uint##VALUE_SIZE r=ALG##_next(s);\
printf("\e[97m next from zero seed:");\
if(r!=EXPECTED_FROM_ZERO){\
printf("\e[91m %llu\n", (uint64)r);\
printf("\e[91m " IFWIN("%llu\n","%lu\n"), (uint64)r);\
throw(ERR_UNEXPECTEDVAL);\
}\
printf("\e[92m %llu\n", (uint64)r);\
printf("\e[92m " IFWIN("%llu\n","%lu\n"), (uint64)r);\
ALG##_free(s);\
s= ALG##_initFromTime();\
r=ALG##_next(s);\
printf("\e[97m next from time seed:\e[92m %llu\n", (uint64)r);\
ALG##_free(s);\
printf("\e[97m next from time seed:\e[92m " IFWIN("%llu\n","%lu\n"), (uint64)r);\
}
void test_rng_algorithms(){