Changeset 50171 in webkit for trunk/JavaScriptCore/wtf


Ignore:
Timestamp:
Oct 27, 2009, 2:04:20 PM (16 years ago)
Author:
[email protected]
Message:

2009-10-27 Carol Szabo <[email protected]>

Reviewed by Darin Adler.

Give an ability to WebKit to free statically allocated pointers
before quit.
https://bugs.webkit.org/show_bug.cgi?id=27980

No new tests for this as the change does not affect WebKit
functionality, but only memory usage.

  • JavaScriptCore/wtf/StdLibExtras.h: Allowed for the override of DEFINE_STATIC_LOCAL via compiler commandline options or elsewhere in the code. Useful for implementing custom builds that free resources allocated via DEFINE_STATIC_LOCAL.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/StdLibExtras.h

    r46598 r50171  
    3333//  it is leaked so that its destructors are not called at exit. Using this
    3434//  macro also allows workarounds a compiler bug present in Apple's version of GCC 4.0.1.
     35#ifndef DEFINE_STATIC_LOCAL
    3536#if COMPILER(GCC) && defined(__APPLE_CC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 1
    3637#define DEFINE_STATIC_LOCAL(type, name, arguments) \
     
    4041#define DEFINE_STATIC_LOCAL(type, name, arguments) \
    4142    static type& name = *new type arguments
     43#endif
    4244#endif
    4345
Note: See TracChangeset for help on using the changeset viewer.