Re: [evolution-patches] Exchange: Fix for the bug 273470



>>> Sarfraaz Ahmed <asarfraaz novell com> 08/18/05 9:14 PM >>>

<quote>
This code leaks the mutex. We should be freeing it when the backend
quits. It would be better to initialize the mutex in the class
initialization code [ init ], and have this mutex as part of the object
private member, so that we can free it as part of the object dispose
routine.

Also, use a more specific name for the mutex, something like, ex_ad_lock
or some such.
</quote>

Surfy -

I don't see much difference in terms of a memory usage between having
the GMutex object here and having it as a part of the class. In both the
cases the object is going to be freed only when the 'evolution-exchange'
process is going to terminate. In other words, this object is needed as
long as the 'evolution-exchange' process is running. Also I feel it is
better to have this object local to the function itself. Also assuming
if a lot of threads will need mutex like this, and putting all the mutex
objects inside the class is going to make the class bulkier. Please let
me know if you still want it to be the part of the class.

Thanks -
Praveen.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]