Closed perarnau closed 1 year ago
Please provide an example of a place where full objects are stored inside an nrm_vector_t as I was not successful in finding one.
src/binaries/nrmd.c
, function nrmd_timer_callback
, lines 424 to 447 are an example. But as indicated above, this one is ok.
This issue dates from before nrm_hash_t existed, and many vector uses disappeared, so maybe there's nothing left to fix.
Therefore I can confirm that there isn't any occurrence where full objects are stored in an nrm_vector_t.
A small number of places in the code are storing full objects inside a nrm_vector_t instead of just storing pointers de the objects.
This need to be fixed in the general case. Be careful though that the internal msg API probably still need to do that, deep copies when sending messages avoid lifetime issues between the daemon and the messaging layer.