You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While looking at the Mutex implementation, I noticed that there is never a call to pthread_mutex_destroy, and the same applies also to other primitives. This "might" lead to leaks in the application. Might, because on some platforms that isn't necessary.
Now the current Mutex::new and Mutex:: from_existing results probably can't do that automatic freeing, since they are not sure whether something else still uses them. There might need to be either an unsafe destroy method for it.
Alternatively, there can be refcount stored in shared memory next to the mutex, and dropping any of those objects decreases it.
The text was updated successfully, but these errors were encountered:
While looking at the Mutex implementation, I noticed that there is never a call to
pthread_mutex_destroy
, and the same applies also to other primitives. This "might" lead to leaks in the application. Might, because on some platforms that isn't necessary.Now the current
Mutex::new
andMutex:: from_existing
results probably can't do that automatic freeing, since they are not sure whether something else still uses them. There might need to be either anunsafe
destroy method for it.Alternatively, there can be refcount stored in shared memory next to the mutex, and dropping any of those objects decreases it.
The text was updated successfully, but these errors were encountered: