Skip to content

Memory leak? #5

@goodguysoft

Description

@goodguysoft

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions