[Webkit-unassigned] [Bug 30408] ThreadSpecific instances or ThreadGlobalData instance is being leaked when the WebKit library is being reloaded.

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


https://bugs.webkit.org/show_bug.cgi?id=30408


Carol Szabo <carol.szabo at nokia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #41310|                            |review?
               Flag|                            |
  Attachment #41258|0                           |1
        is obsolete|                            |




--- Comment #4 from Carol Szabo <carol.szabo at nokia.com>  2009-10-16 12:48:05 PDT ---
Created an attachment (id=41310)
 --> (https://bugs.webkit.org/attachment.cgi?id=41310)
Proposed Patch

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"

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list