• Thomas Van Lenten's avatar
    Remove the use of dispatch_once that is heap backed. · 7d758c00
    Thomas Van Lenten authored
    Apple recently updated the docs on dispatch_once to point out
    that the storage for the dispatch_once_t must be static or global,
    but not something that was ever used before as the implementation
    doesn't use a memory barrier.  So we drop the use and create the
    semaphore when needed and use an atomic swap deal with any
    threading races.
    7d758c00
GPBMessage.m 122 KB