Menu

#6 Memory leak in PThreadMutex.c++

open
nobody
None
5
2005-12-14
2005-12-14
Anonymous
No

In the PThreadMutex.c++ there's a memory leak which can
easily be fixed.

The problem:
The Mutex constructor doesn't destroy mutexattr.

The fix is:
At the end of the constructor invoke:
pthread_mutexattr_destroy(&mutex_attr)

I have tested this. It solves the memory leak.

My email address:
aveenstra@fugro-jason.com

Discussion


Log in to post a comment.