26

Re: shared_ptr

When resolving compile errors occuring when generating oofem with OOFEM_PYTHON_BINDINGS as reported by Hao,  (http://www.oofem.org/forum/viewtopic.php?pid=4874) I have found, that the std::shared_ptr is not supported by boost python (see http://stackoverflow.com/questions/1398 … ared-ptr). This is used by FiledManager to track registered fields.
I have resolved this temporarily by converting shared_ptr to raw pointer (with all the consequencies it may have), but this is definitely a temporary solution and we have to find the solution or wait till boost will support std::shared_ptr.

Re: shared_ptr

I would like to point out that even if we had shared_ptr working here, it would still not be as memory safe as one would think.
The problem is that all the internal pointers they use, i.e. PrimaryField has a pointer to EngineeringModel, so PrimaryField would still break when it has a reference to a nonexistent engineering model, even if the Field itself is preserved.