Skip to content

Fix dangling reference as cell returns a copy of geometry now.#261

Closed
blattms wants to merge 1 commit into
OPM:masterfrom
blattms:fix-dangling-pointer-if-cell-geometry-is-copied
Closed

Fix dangling reference as cell returns a copy of geometry now.#261
blattms wants to merge 1 commit into
OPM:masterfrom
blattms:fix-dangling-pointer-if-cell-geometry-is-copied

Conversation

@blattms

@blattms blattms commented Aug 2, 2018

Copy link
Copy Markdown
Member

When geometry returned a reference we could simply store a
reference to its stored center. With geometry returned as a copy this
has become a dangling reference. We fix this by storing a constant reference
to the geometry and then reference its center.

This change is needed for the PR OPM/opm-grid#334

When geometry() returned a reference we could simply store a
reference to its stored center. With the geometry returned as a copy this
has become a dangling reference. We fix this by storing a constant reference
to the geometry and then reference its center.
@atgeirr

atgeirr commented Aug 2, 2018

Copy link
Copy Markdown
Member

Should we jenkins and merge this now? I don't see the need to wait for OPM/opm-grid#334?

@blattms

blattms commented Aug 3, 2018

Copy link
Copy Markdown
Member Author

This fix seems to be at the wrong place.

@blattms blattms closed this Aug 3, 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

Successfully merging this pull request may close these issues.

2 participants