fixedmemory leaks in Autoarr
This commit is contained in:
@@ -33,39 +33,33 @@ void print_dtsod(Hashtable* dtsod){
|
||||
}
|
||||
|
||||
void test_dtsod(){
|
||||
// optime(__func__,1,({
|
||||
optime(__func__,1,({
|
||||
kprintf("\e[96m-------------[test_dtsod]-------------\n");
|
||||
Hashtable* dtsod;
|
||||
char* s;
|
||||
|
||||
do {
|
||||
// optime("deserialize",1,({
|
||||
optime("deserialize",1,({
|
||||
tryLast(DtsodV24_deserialize(text),r)
|
||||
dtsod=r.value.VoidPtr;
|
||||
// }));
|
||||
} while(0);
|
||||
}));
|
||||
print_dtsod(dtsod);
|
||||
|
||||
do {
|
||||
// optime("serialize",1,({
|
||||
optime("serialize",1,({
|
||||
tryLast(DtsodV24_serialize(dtsod),r)
|
||||
s=r.value.VoidPtr;
|
||||
// }));
|
||||
} while(0);
|
||||
}));
|
||||
DtsodV24_free(dtsod);
|
||||
kprintf("\e[92m%s",s);
|
||||
|
||||
do {
|
||||
// optime("reserialize",10,({
|
||||
optime("reserialize",10,({
|
||||
tryLast(DtsodV24_deserialize(s),r)
|
||||
dtsod=r.value.VoidPtr;
|
||||
free(s);
|
||||
tryLast(DtsodV24_serialize(dtsod),rr)
|
||||
s=rr.value.VoidPtr;
|
||||
DtsodV24_free(dtsod);
|
||||
// }));
|
||||
} while(0);
|
||||
}));
|
||||
|
||||
free(s);
|
||||
// }));
|
||||
}));
|
||||
}
|
||||
@@ -28,12 +28,12 @@ inline void test_all(){
|
||||
test_searchtree();
|
||||
test_autoarr();
|
||||
test_autoarrVsVector();
|
||||
test_hash_functions();
|
||||
test_hashtable();
|
||||
test_dtsod();
|
||||
test_rng_algorithms();
|
||||
test_kprint_colors();
|
||||
test_kprint();
|
||||
test_hash_functions();
|
||||
test_hashtable();
|
||||
test_dtsod();
|
||||
kprintf("\e[96m--------------------------------------\e[0m\n");
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user