I try to use this library; in long run, program memory usage becomes inadequately huge. I reviewed code and found following fragment:
__forceinline CsInsClass_t Instructions(__in size_t i)
{
return *new CsInsClass_t(m_csh, m_csInstructions + i);
}
We create instance of CsInsClass_t in heap and return its copy (even not reference), so there are no way to call delete and clean memory.
Each time we try to disassemble instruction, we get memory leak.
I try to use this library; in long run, program memory usage becomes inadequately huge. I reviewed code and found following fragment:
We create instance of
CsInsClass_tin heap and return its copy (even not reference), so there are no way to calldeleteand clean memory.Each time we try to disassemble instruction, we get memory leak.