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


https://bugs.freedesktop.org/show_bug.cgi?id=38835

--- Comment #6 from Jan Holesovsky <kendy@collabora.com> ---
Let me add some more information to this Easy Hack, as it would be really quite
useful to improve the situation :-)

The simplest way to find global statics is like:

git grep '^static[^(]*$' -- "*.cxx"

and look after those that define a global variable of a more complex type (ie.
skip the OUStrings / bools / ints for now).

Then as the first thing, try to make it non-global if it is possible, like
here:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=92bede3900e84d4f08efb81757ec95c518c7fa76

because that way this will get initialized when used for the first time.  If
that is not possible, or not practical, then you can do what is suggested in
the initial comment.  An example can be seen in this commit:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=020e29fb95d742b160feab1df6751e59d4108239

Hope that helps :-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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.