Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


sberg wrote
On 04/12/2015 08:50 AM, julien2412 wrote:
...
The general reason for this construct is multi-threading:  Access to the 
maChangeListeners member typically needs to be guarded by some mutex 
(typically a member of the same class instance as maChangeListeners), 
and the calls "out of that instance" to the

   (*iListener)->disposing(aEvent);

must be done with that mutex not locked (to avoid deadlock).
...
However, in this particular case, the access to maChangeListeners is not 
guarded, but likely out of ignorance of the original author.

Thank you Stephan for your feedback.

I've tried to find a similar case with a mutex but haven't found any.
For example, in a completely different part,
http://opengrok.libreoffice.org/xref/core/sdext/source/presenter/PresenterWindowManager.cxx#943
no mutex.
Could you give an example so I could apply it to our initial case or do you
prefer I just fix the variable use for the moment?

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/About-tdf-90566-Theme-disposing-void-memory-leak-maChangeListeners-is-not-properly-disposed-tp4146014p4146110.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.