[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 10:39:07 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27980
--- Comment #15 from Adam Treat <treat at kde.org> 2009-08-05 10:39:05 PDT ---
(In reply to comment #14)
> > 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)
I see your second patch is special casing them, but it is not deleting them as
you are not explicitly calling the destructor you are just deleting them as
normal.
> Adam, if you really want I can stop this task. I don't want to force anything
> if you don't like it.
No, feel free to continue I just have doubts that this method of dealing with
it will be robust enough to deal with the stated goal without encuring a lot of
new requirements.
--
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