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

Code bug(memory leaks) #49

Open
fabulousfeng opened this issue Sep 13, 2018 · 1 comment
Open

Code bug(memory leaks) #49

fabulousfeng opened this issue Sep 13, 2018 · 1 comment

Comments

@fabulousfeng
Copy link

~MaybeStaticArray() (hierarchical_softmax.cc:316)
Mismatched free() / delete / delete [] is detected by Valgrind.
delete dynamic_array;
should be replaced by
delete [] dynamic_array;
since you defined new T[dynamic_size] in the constructor.
This may cause undefined behavior.

@fabulousfeng
Copy link
Author

@akhti

@fabulousfeng fabulousfeng changed the title code bug Code bug(memory leaks) Sep 14, 2018
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