You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, I use calloc all throughout the repo.
Makes sense to change that.
Riley's comment:
If you do new T[length_of_buffer]{} (not the curly braces), then it will zero-initialize.
An advantage to new is that it will work if T is std::complex or std::complex (defacto-standard datatypes for complex floats in C++). I don't know if calloc will work in that situation. That said, calloc apparently works with realloc, while new does not.
I says we open a GitHub issue about this so we establish a policy for new contributions.
We also need to consider getting rid of the internal allocations.
The discussion on all that is present in PR#71
The text was updated successfully, but these errors were encountered:
At the moment, I use
calloc
all throughout the repo.Makes sense to change that.
Riley's comment:
If you do new T[length_of_buffer]{} (not the curly braces), then it will zero-initialize.
An advantage to new is that it will work if T is std::complex or std::complex (defacto-standard datatypes for complex floats in C++). I don't know if calloc will work in that situation.
That said, calloc apparently works with realloc, while new does not.
I says we open a GitHub issue about this so we establish a policy for new contributions.
We also need to consider getting rid of the internal allocations.
The discussion on all that is present in PR#71
The text was updated successfully, but these errors were encountered: