[Webkit-unassigned] [Bug 27980] Give an ability to WebKit to free statically allocated pointers before quit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 5 08:24:40 PDT 2009


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





--- Comment #13 from Adam Treat <treat at kde.org>  2009-08-05 08:24:38 PDT ---
(In reply to comment #12)
>  - using DEFINE_GLOBAL (WebCore/platform/StaticConstructors.h)
>    * these variables cannot be freed, since they are allocated on the heap
>    * workaround: wrapper classes
>      Any better idea?
>    * fortunately it is a rarely used directive (only two classes: AtomicString
> and QualifiedName)

And those classes have lots of instances.  In fact, I'd wager the majority of
static globals you'll find in WebCore are of this type.  What's more, have fun
trying to destruct them in the right order.

One other concern I don't think you've considered is what happens when these
global statics are allocated on the heap with placement new?  This occurs right
now in WebCore if you look carefully :)  With placement new allocated global
statics you'll have to explicitly call the destructor.  Not sure how you are
going to automate that one.

-- 
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