> On 6 Oct 2016, at 16:06, Mateusz Jemielity <m.jemiel...@is-wireless.com> > wrote: > > The effects are equivalent to pthread_rwlock_init, thus in my opinion they > require pthread_rwlock_destroy. The internals of rwlock are opaque to me and > I don't know what resources are used (especially on different systems and > implementations), so I should cleanly free them just in case. > I know it's not common usecase to do something like that. In my scenario I > want to replace rwlock created using static initializer with another one > that uses custom attributes.
I can't say I've used pthread_rwlock_* much but I've used pthread_mutex_* before which has the same init/destroy/static initializer trio and that seemed right. However, I'm not sure why you'd need to call pthread_*_destroy on a statically initialised object, given that presumably you destroy it when the program is about to exit and the resources would be given back to the OS anyway. -- Alex Bligh ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users