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

LLVM::Module.parse_bitcode does not dispose the memory buffer #21

Closed
whitequark opened this issue Jan 5, 2013 · 2 comments
Closed

LLVM::Module.parse_bitcode does not dispose the memory buffer #21

whitequark opened this issue Jan 5, 2013 · 2 comments

Comments

@whitequark
Copy link

I don't see the temporary MemoryBuffer destroyed anywhere. It probably should get a finalizer registered.

Besides, this seems to be a problem with basically all classes.

@jvoorhis
Copy link
Owner

jvoorhis commented Jan 5, 2013

After reviewing the code, I agree this does seem problematic. A finalizer could do the job, but my preference would be to release the buffer explicitly as soon as it's no longer needed. Thanks for catching this!

@whitequark
Copy link
Author

I agree that it is best to release the buffer explicitly when possible. The current implementation of dispose already allows that.

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

2 participants