Conversation
|
The mac jobs are failing due to |
|
Looks like they deprecated the macos-10.15 container on gh actions? actions/runner-images#5583 |
|
I switched in mfem/mfem#3162 to Should we do the same here? |
| // HACK: don't let unique_ptr free the data | ||
| for (int i = 0; i < streams.size(); ++i) | ||
| { | ||
| istreams[i].release(); |
There was a problem hiding this comment.
Are these streams being used elsewhere outside this function?
There was a problem hiding this comment.
No they are not.
Ideally we can come up with a way to get a std::vector<std::unique_ptr<std::istream>> view of the std::vector<std::string> argument but I'm not sure how to do that. Any ideas? The other option is to change the signature of ReadStream but that would mean changing glvis.cpp
There was a problem hiding this comment.
I guess I was asking more about the use of unique_ptr::release(); I think the use of std::stringstream is fine given that we also have to handle the case of live sockets via mfem's socketstream when running as a desktop application. It also looks like the mfem::Mesh and GridFunction ctors expect an std::istream-like argument.
There was a problem hiding this comment.
Ah! Good question. The unique_ptrs are referencing the stack allocated streamstreams and I don't want unique_ptr to try to destruct them since that would be a double-free. I'm not sure if we can improve, thoughts ?
displayandupdatemethodsReadInputStreamsfromglvis.cpptolib/stream_state.*keep_attris now a member ofStreamState