Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak? #5

Open
goodguysoft opened this issue Oct 10, 2019 · 0 comments
Open

Memory leak? #5

goodguysoft opened this issue Oct 10, 2019 · 0 comments

Comments

@goodguysoft
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant