0mar / dealiiscale

Finite element simulation of a two-scale problem implemented in deal.II
1 stars 1 forks source link

Switch raw pointers to smart pointers #5

Closed 0mar closed 4 years ago

0mar commented 5 years ago

This is terribly sensitive to segfaults and I'm certain they will cost me a lot of time in the future. Smart pointers should resolve take care of a lot of memory problems.

0mar commented 4 years ago

Difficult, because in the use case we are looking at, we have data ownership by one object, while another object merely wants an access shortcut. But smart pointers are created with a reference counter, so cannot live next to a standard reference to the object.

Not sure how to fix this

0mar commented 4 years ago

Leaving it like this for the moment, it seems that I don't have to introduce more pointers, and the few that are used look okay