[webkit-reviews] review requested: [Bug 30408] ThreadSpecific instances or ThreadGlobalData instance is being leaked when the WebKit library is being reloaded. : [Attachment 41310] Proposed Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 16 12:48:04 PDT 2009


Carol Szabo <carol.szabo at nokia.com> has asked  for review:
Bug 30408: ThreadSpecific instances or ThreadGlobalData instance is being
leaked when the WebKit library is being reloaded.
https://bugs.webkit.org/show_bug.cgi?id=30408

Attachment 41310: Proposed Patch
https://bugs.webkit.org/attachment.cgi?id=41310&action=review

------- Additional Comments from Carol Szabo <carol.szabo at nokia.com>
While fast exit is generally a desirable feature for any application the lack
of an elegant cleanup has its drawbacks:
1. There are some devices where almost all applications run in the same process
space, thus when an application quits, it's libraries are unloaded from memory,
but the application is expected to do its own cleanup.
2. When testing for memory leaks, these never cleaned singletons and their
dependencies pollute the list of detected leaks that tools like valgrind
generate.

Hence this patch tries to be a step towards the best of both worlds:
1. For those for whom a quick exit is the only goal, this patch provides
nothing but consistency in the way singletons are defined. No overhead, no
change.
2. For the other camp for whom an elegant cleanup is important (such as style
purists, testers and developers for antiquated OSes) a relatively clean and
easy method is provided to have the singletons cleaned up before the WebKit
library is unloaded: define the DEFINE_STATIC_LOCAL macro on the compiler's
command line like this:
"-DDEFINE_STATIC_LOCAL(type, name, arguments)=type name arguments"


More information about the webkit-reviews mailing list