DEFINE_STATIC_LOCAL

View: New views
2 Messages — Rating Filter:   Alert me  

DEFINE_STATIC_LOCAL

by Yong Li-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just noticed the following code:
 
#else
#define DEFINE_STATIC_LOCAL(type, name, arguments) \
    static type& name = *new type arguments
#endif
 
Is there any reason of doing this? For example, we want to prevent dtors of all static objects from being called?
 
Best regards,
 
Yong Li

_______________________________________________
webkit-dev mailing list
webkit-dev@...
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Re: DEFINE_STATIC_LOCAL

by Eric Seidel-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

On Thu, Oct 29, 2009 at 12:13 PM, Yong Li <yong.li.webkit@...> wrote:

> I just noticed the following code:
>
> #else
> #define DEFINE_STATIC_LOCAL(type, name, arguments) \
>     static type& name = *new type arguments
> #endif
>
> Is there any reason of doing this? For example, we want to prevent dtors of
> all static objects from being called?
>
> Best regards,
>
> Yong Li
> _______________________________________________
> webkit-dev mailing list
> webkit-dev@...
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
_______________________________________________
webkit-dev mailing list
webkit-dev@...
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev