I have a global object which is shared by different threads. To provide the synchronization, I have added a mutex inside the global object. Mutex will be locked by a thread before accessing the data inside the object. Everything is fine except delete. If a thread is locking the mutex and deleting the object. How again it can unlock it? How can a safe delete be implemented using this approach i.e. keeping mutex inside the object?
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)