It appears the problem is that we are not calling the memory region destructor. After modifying memory_unmap to include the destructor call for the memory region, the memory is freed. Furthermore in uc_close we must explicitly free any blocks that were not unmapped by the user to prevent leaks. This should fix issue 305.
58 KiB
58 KiB