I was referring to MacOS/iOS, where the message is posted into this array
in the MessageQueue class:
void post (MessageManager::MessageBase* const message)
{
messages.add (message);
wakeUp();
}
messages uses a CriticalSection and may be dynamically reallocated.
ReferenceCountedArray<MessageManager::MessageBase, CriticalSection> messages;
Maybe this could be replaced by a lock-free Fifo
Wonder what @jules opinion is?