Using C++, in one of my destructors, i say
mutex = NULL;
This however results in an error “No viable overloaded '='” in my Xcode.
Same mutex was previously initialized in a constructor as
mutex = PTHREAD_MUTEX_INITIALIZER;
Please advise, how can i properly handle this as part of C++ destructor
You may use
pthread_mutex_destroy()to destroy the mutex object.According to the POSIX specification: