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

"Fix" M2 Mac TDFieldExporter2D problem. #254

Merged
merged 4 commits into from
Mar 10, 2023

Conversation

samcunliffe
Copy link
Member

@samcunliffe samcunliffe commented Mar 10, 2023

3b0fcb3 fixes the problem with exporting the fields to a non-existent directory. And since I've got the context in my head, I replaced char* folder_name in the TDFieldExporter2D to an std::string and did some sanity refactoring in 9fbe3e7.

Probably related to #211. Superficially fixes #255 (I retrospectively created a bug report) and fixes #129 (I forgot that we'd seen this before and it disappeared).

I don't understand how the previous c_str() call could be any different.
For consistency and sanity. Use std::string in the TDFieldExporter2D.
Check std::string equality early and convert to char array only for
writing the file.
@samcunliffe samcunliffe added the bug Something isn't working label Mar 10, 2023
@samcunliffe samcunliffe added the review required A review approval is required before merging label Mar 10, 2023
@samcunliffe samcunliffe marked this pull request as ready for review March 10, 2023 12:43
Co-authored-by: Will Graham <[email protected]>
@samcunliffe samcunliffe merged commit 369d963 into main Mar 10, 2023
@samcunliffe samcunliffe deleted the strange-mac-m2-memory-problem branch March 10, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working review required A review approval is required before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Garbage when reading in a blank string for tdfdir on M2 Mac. Memory leak in TDFieldExporter2D::export_field
2 participants