hi folks! i am porting some c++ where we have something like std::vector<*Node>
To make this better, I am migrating towards Vec<Arc<RwLock<Option<Node>>>>
I am nearly there. However, now I need to consider the c++ function delete_nodes and delete_node where we traverse the vector, finalize each node and free their memory
So... what can be done here in rust land?
At the moment, I am assuming the c++ frees the nodes in the proper places (in other words that no memory accesses are attempted after the node is properly freed.
I dont have enough of the system translated yet to test this assumption at runtime.
I am thinking that perhaps all I need to do is simply take the option from the interior of this Arc.
If anybody else tries to use it, they will see the fact that it has become none and have to reroute their logic or panic.
Is this an acceptable solution?