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.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to