[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 09:54:35 PDT 2009


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





--- Comment #14 from Zoltan Herczeg <zherczeg at inf.u-szeged.hu>  2009-08-05 09:54:33 PDT ---
> 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.

In may patch a specialized wrapper class inherited from StaticPtrBase solves
this problem (in WebCore at least). See GlobalAtomicString and
GlobalQualifiedName. The placement news are replaced by a macro call
(INIT_GLOBAL) which has a different behaviour depending on
ENABLE(FREE_STATIC_PTRS). (I belive placement news are ugly, and now it looks
much better)

Adam, if you really want I can stop this task. I don't want to force anything
if you don't like it.

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