mutex_destroy

What if one forgets to do mutex_destroy(&mutex)
can this cause memory leak?
learningunixAsked:
Who is Participating?
 
Infinity08Commented:
That depends on the specific implementation, but not calling mutex_destroy for an initialized mutex could cause a memory leak yes.

As a rule, always make sure to properly clean up acquired resources, including mutexes.
0
 
learningunixAuthor Commented:
Thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.