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

incorrect free memory #11

Open
thuliu-yt16 opened this issue Mar 1, 2024 · 0 comments
Open

incorrect free memory #11

thuliu-yt16 opened this issue Mar 1, 2024 · 0 comments

Comments

@thuliu-yt16
Copy link

Putting multiple array pointers in a single delete[] line is incorrect. E.g., in base_solver.h:


and
delete[] mask, tgt, grad;

They lead to memory leaks.

Instead, they should be

    delete[]  A;
    delete[]  B;
    delete[]  X;

and

    delete[]  mask;
    delete[]  tgt;
    delete[]  grad;
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