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

Fixed: Resolving memory clashes when using shared mixed grid #289

Closed
wants to merge 2 commits into from

Conversation

kmokstad
Copy link
Contributor

@kmokstad kmokstad commented Sep 7, 2018

With this changes the used of shared mixed grids works without crashing or valgrind issues at least.
Needs to be checked further (and also for 3D).

}
delete surf;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without the delete here, we leak, surf is reassigned to a clone below.

Copy link
Contributor Author

@kmokstad kmokstad Sep 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the grid is shared, you can't delete surf, because then the object pointed to already has been deleted by the owner patch, that's why valgrind give you a message on this line, I think. It is still being deleted when the grid is not shared, that's why its is moved inside the if (m_basis.empty()) block. But it can be the fix has to be different. I only noticed that valgrind stopped complaining about it (did not check for leakage).

Changed: Made the 2D and 3D mixed implementations equivalent.
There were some discrepancies here and there which I think were not
intended, but a result of doing non-tested things at different times.
DOFs to constrain for all bases (when invoked with basis=0)
@kmokstad
Copy link
Contributor Author

The last commit is now in #397. The rest is obsolete.

@kmokstad kmokstad closed this Jan 30, 2020
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

Successfully merging this pull request may close these issues.

2 participants