1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-16 00:34:19 +00:00

Changed the Message class to be reference-counted, and used this to tighten up some messaging code. Minor tweaks to AudioThumbnail, ReferenceCountedArray.

This commit is contained in:
Julian Storer 2010-12-19 19:33:52 +00:00
parent 1a887cda63
commit d60f661789
22 changed files with 573 additions and 527 deletions

View file

@ -1536,6 +1536,10 @@ void Component::exitModalState (const int returnValue)
}
else
{
// if component methods are being called from threads other than the message
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
CHECK_MESSAGE_MANAGER_IS_LOCKED
class ExitModalStateMessage : public CallbackMessage
{
public:
@ -2111,6 +2115,10 @@ void Component::parentSizeChanged()
void Component::addComponentListener (ComponentListener* const newListener)
{
// if component methods are being called from threads other than the message
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
CHECK_MESSAGE_MANAGER_IS_LOCKED
componentListeners.add (newListener);
}
@ -2156,6 +2164,10 @@ void Component::paintOverChildren (Graphics&)
//==============================================================================
void Component::postCommandMessage (const int commandId)
{
// if component methods are being called from threads other than the message
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
CHECK_MESSAGE_MANAGER_IS_LOCKED
class CustomCommandMessage : public CallbackMessage
{
public: