removed prints now that the memory leaks are gone

xtremegamer1 2 years ago
parent f8247a9487
commit 38754fc26b

@ -4,3 +4,4 @@ extern int g_allocation_tracker;
uc_err uct_context_alloc(uc_engine *uc, uc_context **context); uc_err uct_context_alloc(uc_engine *uc, uc_context **context);
uc_err uct_context_free(uc_context *context); uc_err uct_context_free(uc_context *context);
void print_allocation_number();

@ -5,11 +5,18 @@ int g_allocation_tracker;
uc_err uct_context_alloc(uc_engine *uc, uc_context **context) uc_err uct_context_alloc(uc_engine *uc, uc_context **context)
{ {
std::printf("Allocations: %p\n", ++g_allocation_tracker); ++g_allocation_tracker;
//std::printf("Allocations: %p\n", g_allocation_tracker);
return uc_context_alloc(uc, context); return uc_context_alloc(uc, context);
} }
uc_err uct_context_free(uc_context *context) uc_err uct_context_free(uc_context *context)
{ {
std::printf("Allocations: %p\n", --g_allocation_tracker); +g_allocation_tracker--;
//std::printf("Allocations: %p\n", g_allocation_tracker);
return uc_context_free(context); return uc_context_free(context);
} }
void print_allocation_number()
{
std::printf("uc_context allocations: %p\n", g_allocation_tracker);
}
Loading…
Cancel
Save