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 in copc::FileReader #142

Open
Haojia521 opened this issue Dec 29, 2022 · 1 comment
Open

memory leak in copc::FileReader #142

Haojia521 opened this issue Dec 29, 2022 · 1 comment

Comments

@Haojia521
Copy link

The constructor of copc::FileReader calls initialization functions which may throw an exception. When an exception is thrown, the construction of the copc::FileReader object is interrupted and its deconstructor will not be called. Thus, the memory of std::fstream object 'f_stream' leaks.

@clee-ai
Copy link
Contributor

clee-ai commented Jan 23, 2023

@Haojia521 thanks for the report! Looks like some refactoring will be needed since we raise exceptions in a few methods called by constructors.

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