[webkit-changes] [56710] trunk/WebCore

Dan Bernstein mitz at apple.com
Mon Mar 29 10:04:34 PDT 2010


On Mar 29, 2010, at 12:41 AM, philn at webkit.org wrote:

> Revision
> 56710
> Author
> philn at webkit.org
> Date
> 2010-03-29 00:41:01 -0700 (Mon, 29 Mar 2010)
> 
>  
> -    static HashSet<String> cache;
> -    static bool typeListInitialized = false;
> +    DEFINE_STATIC_LOCAL(HashSet<String>, cache, ());
> +    DEFINE_STATIC_LOCAL(bool, typeListInitialized, (false));
This will allocate the boolean on the heap. There is no reason to do so. DEFINE_STATIC_LOCAL only makes sense for objects that have destructors.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-changes/attachments/20100329/80fae5e2/attachment.html>


More information about the webkit-changes mailing list