From f73d602b45a6e88eaa03984168ce3273a8151b8f Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Tue, 5 Apr 2011 13:15:52 +0100 Subject: [PATCH] 64-bit VST tweaks. Removed leak warnings for messages. --- .../Source/Project/jucer_ResourceFile.cpp | 46 ++++++----- .../Source/Project/jucer_ResourceFile.h | 8 +- .../Source/Utility/jucer_CodeHelpers.cpp | 10 +++ .../Source/Utility/jucer_CodeHelpers.h | 1 + .../wrapper/RTAS/juce_RTAS_MacUtilities.mm | 2 + .../wrapper/VST/juce_VST_Wrapper.mm | 58 ++++++++++--- juce_amalgamated.cpp | 81 ++++++------------- juce_amalgamated.h | 10 ++- src/containers/juce_Variant.cpp | 10 +-- src/core/juce_StandardHeader.h | 2 +- src/core/juce_Time.cpp | 71 +++++----------- src/events/juce_CallbackMessage.h | 4 +- src/events/juce_Message.h | 4 +- 13 files changed, 158 insertions(+), 149 deletions(-) diff --git a/extras/Introjucer/Source/Project/jucer_ResourceFile.cpp b/extras/Introjucer/Source/Project/jucer_ResourceFile.cpp index 63639555d8..048c3afc7f 100644 --- a/extras/Introjucer/Source/Project/jucer_ResourceFile.cpp +++ b/extras/Introjucer/Source/Project/jucer_ResourceFile.cpp @@ -87,7 +87,28 @@ void ResourceFile::setClassName (const String& className_) void ResourceFile::addFile (const File& file) { - files.add (new File (file)); + files.add (file); + + const String variableNameRoot (CodeHelpers::makeBinaryDataIdentifierName (file)); + String variableName (variableNameRoot); + + int suffix = 2; + while (variableNames.contains (variableName)) + variableName = variableNameRoot + String (suffix++); + + variableNames.add (variableName); +} + +const String ResourceFile::getDataVariableFor (const File& file) const +{ + jassert (files.indexOf (file) >= 0); + return variableNames [files.indexOf (file)]; +} + +const String ResourceFile::getSizeVariableFor (const File& file) const +{ + jassert (files.indexOf (file) >= 0); + return variableNames [files.indexOf (file)] + "Size"; } int64 ResourceFile::getTotalDataSize() const @@ -95,7 +116,7 @@ int64 ResourceFile::getTotalDataSize() const int64 total = 0; for (int i = 0; i < files.size(); ++i) - total += files.getUnchecked(i)->getSize(); + total += files.getReference(i).getSize(); return total; } @@ -118,25 +139,12 @@ bool ResourceFile::write (const File& cppFile, OutputStream& cpp, OutputStream& header << CodeHelpers::createIncludeStatement (juceHeader, cppFile) << newLine; const String namespaceName (className); - StringArray variableNames, returnCodes; + StringArray returnCodes; int i; for (i = 0; i < files.size(); ++i) - { - String variableNameRoot (CodeHelpers::makeValidIdentifier (files.getUnchecked(i)->getFileName() - .replaceCharacters (" .", "__") - .retainCharacters ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789"), - false, true, false)); - String variableName (variableNameRoot); - - int suffix = 2; - while (variableNames.contains (variableName)) - variableName = variableNameRoot + String (suffix++); - - variableNames.add (variableName); - returnCodes.add ("numBytes = " + namespaceName + "::" + variableName + "Size; return " - + namespaceName + "::" + variableName + ";"); - } + returnCodes.add ("numBytes = " + namespaceName + "::" + variableNames[i] + "Size; return " + + namespaceName + "::" + variableNames[i] + ";"); cpp << CodeHelpers::createIncludeStatement (cppFile.withFileExtension (".h"), cppFile) << newLine << newLine @@ -155,7 +163,7 @@ bool ResourceFile::write (const File& cppFile, OutputStream& cpp, OutputStream& for (i = 0; i < files.size(); ++i) { - const File file (*files.getUnchecked(i)); + const File& file = files.getReference(i); const int64 dataSize = file.getSize(); ScopedPointer fileStream (file.createInputStream()); diff --git a/extras/Introjucer/Source/Project/jucer_ResourceFile.h b/extras/Introjucer/Source/Project/jucer_ResourceFile.h index 2cd84cdec8..bc8776f2fe 100644 --- a/extras/Introjucer/Source/Project/jucer_ResourceFile.h +++ b/extras/Introjucer/Source/Project/jucer_ResourceFile.h @@ -43,8 +43,13 @@ public: //============================================================================== void setJuceHeaderToInclude (const File& header); + void setClassName (const String& className); + const String getClassName() const { return className; } + void addFile (const File& file); + const String getDataVariableFor (const File& file) const; + const String getSizeVariableFor (const File& file) const; int getNumFiles() const { return files.size(); } int64 getTotalDataSize() const; @@ -54,7 +59,8 @@ public: //============================================================================== private: - OwnedArray files; + Array files; + StringArray variableNames; Project& project; File juceHeader; String className; diff --git a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp index c581b974ac..7beaaf3290 100644 --- a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp +++ b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.cpp @@ -186,6 +186,14 @@ namespace CodeHelpers + "_" + String::toHexString (file.hashCode()).toUpperCase() + "__"; } + const String makeBinaryDataIdentifierName (const File& file) + { + return makeValidIdentifier (file.getFileName() + .replaceCharacters (" .", "__") + .retainCharacters ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789"), + false, true, false); + } + const String stringLiteral (const String& text) { if (text.isEmpty()) @@ -344,6 +352,8 @@ namespace CodeHelpers s << ", Font::bold"; else if (font.isItalic()) s << ", Font::italic"; + else if (name != Font::getDefaultSansSerifFontName()) // need this param if we're using the typeface name constructor + s << ", Font::plain"; return s + ")"; } diff --git a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h index a4d5bd1c88..36e8615ca2 100644 --- a/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h +++ b/extras/Introjucer/Source/Utility/jucer_CodeHelpers.h @@ -35,6 +35,7 @@ namespace CodeHelpers const String addEscapeChars (const String& text); const String createIncludeStatement (const File& includeFile, const File& targetFile); const String makeHeaderGuardName (const File& file); + const String makeBinaryDataIdentifierName (const File& file); const String stringLiteral (const String& text); const String stringLiteralIfNotEmpty (const String& text); // if the string's empty, this returns an empty string diff --git a/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm b/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm index 0e740cb216..214f038231 100644 --- a/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm +++ b/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm @@ -45,7 +45,9 @@ //============================================================================== void initialiseMacRTAS() { + #if ! JUCE_64BIT NSApplicationLoad(); + #endif } void* attachSubWindow (void* hostWindowRef, Component* comp) diff --git a/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm b/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm index d03a17adf1..3fb35284fb 100644 --- a/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm +++ b/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm @@ -34,7 +34,9 @@ #include "../juce_PluginHeaders.h" #include "../juce_PluginHostType.h" -#define ADD_CARBON_BODGE 1 // see note below.. +#if ! (JUCE_64BIT || defined (ADD_CARBON_BODGE)) + #define ADD_CARBON_BODGE 1 // see note below.. +#endif //============================================================================== BEGIN_JUCE_NAMESPACE @@ -93,13 +95,27 @@ static pascal OSStatus viewBoundsChangedEvent (EventHandlerCallRef, EventRef, vo //============================================================================== void initialiseMac() { + #if ! JUCE_64BIT NSApplicationLoad(); + #endif } void* attachComponentToWindowRef (Component* comp, void* windowRef) { JUCE_AUTORELEASEPOOL + #if JUCE_64BIT + NSView* parentView = (NSView*) windowRef; + + #if JucePlugin_EditorRequiresKeyboardFocus + comp->addToDesktop (0, parentView); + #else + comp->addToDesktop (ComponentPeer::windowIgnoresKeyPresses, parentView); + #endif + + [[parentView window] setAcceptsMouseMovedEvents: YES]; + return parentView; + #else NSWindow* hostWindow = [[NSWindow alloc] initWithWindowRef: windowRef]; [hostWindow retain]; [hostWindow setCanHide: YES]; @@ -141,11 +157,11 @@ void* attachComponentToWindowRef (Component* comp, void* windowRef) updateComponentPos (comp); -#if ! JucePlugin_EditorRequiresKeyboardFocus + #if ! JucePlugin_EditorRequiresKeyboardFocus comp->addToDesktop (ComponentPeer::windowIsTemporary | ComponentPeer::windowIgnoresKeyPresses); -#else + #else comp->addToDesktop (ComponentPeer::windowIsTemporary); -#endif + #endif comp->setVisible (true); comp->toFront (false); @@ -160,7 +176,7 @@ void* attachComponentToWindowRef (Component* comp, void* windowRef) [hostWindow orderFront: nil]; [pluginWindow orderFront: nil]; -#if ADD_CARBON_BODGE + #if ADD_CARBON_BODGE { // Adds a callback bodge to work around some problems with wrapped // carbon windows.. @@ -176,14 +192,17 @@ void* attachComponentToWindowRef (Component* comp, void* windowRef) (void*) hostWindow, &ref); comp->getProperties().set ("carbonEventRef", String::toHexString ((pointer_sized_int) (void*) ref)); } - -#endif + #endif return hostWindow; + #endif } void detachComponentFromWindowRef (Component* comp, void* nsWindow) { + #if JUCE_64BIT + comp->removeFromDesktop(); + #else { JUCE_AUTORELEASEPOOL @@ -191,11 +210,11 @@ void detachComponentFromWindowRef (Component* comp, void* nsWindow) comp->getProperties() ["boundsEventRef"].toString().getHexValue64(); RemoveEventHandler (ref); -#if ADD_CARBON_BODGE + #if ADD_CARBON_BODGE ref = (EventHandlerRef) (void*) (pointer_sized_int) comp->getProperties() ["carbonEventRef"].toString().getHexValue64(); RemoveEventHandler (ref); -#endif + #endif HIViewRef dummyView = (HIViewRef) (void*) (pointer_sized_int) comp->getProperties() ["dummyViewRef"].toString().getHexValue64(); @@ -220,15 +239,25 @@ void detachComponentFromWindowRef (Component* comp, void* nsWindow) // how many messages will be dispatched, which seems to be vital in Reaper) for (int i = 20; --i >= 0;) MessageManager::getInstance()->runDispatchLoopUntil (1); + #endif } void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth, int newHeight, const PluginHostType& host) { + JUCE_AUTORELEASEPOOL + + #if JUCE_64BIT + NSView* hostView = (NSView*) nsWindow; + if (hostView != 0) + { + // xxx is this necessary, or do the hosts detect a change in the child view and do this automatically? + [hostView setSize: NSMakeSize ([hostView size].width + (newWidth - component->getWidth()), + [hostView size].height + (newHeight - component->getHeight()))]; + } + #else NSWindow* hostWindow = (NSWindow*) nsWindow; if (hostWindow != 0) { - JUCE_AUTORELEASEPOOL - // Can't use the cocoa NSWindow resizing code, or it messes up in Live. Rect r; GetWindowBounds ((WindowRef) [hostWindow windowRef], kWindowContentRgn, &r); @@ -239,19 +268,26 @@ void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth r.left = r.top = 0; InvalWindowRect ((WindowRef) [hostWindow windowRef], &r); } + #endif } void checkWindowVisibility (void* nsWindow, Component* comp) { + #if JUCE_64BIT + NSView* hostWindow = (NSView*) nsWindow; + #else NSWindow* hostWindow = (NSWindow*) nsWindow; + #endif comp->setVisible ([hostWindow isVisible]); } void forwardCurrentKeyEventToHost (Component* comp) { + #if ! JUCE_64BIT NSWindow* win = [(NSView*) comp->getWindowHandle() window]; [[win parentWindow] makeKeyWindow]; [NSApp postEvent: [NSApp currentEvent] atStart: YES]; + #endif } diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 8e68a745bc..082ee15128 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -1884,20 +1884,20 @@ int64 Time::currentTimeMillis() throw() { // get the time once using normal library calls, and store the difference needed to // turn the millisecond counter into a real time. -#if JUCE_WINDOWS + #if JUCE_WINDOWS struct _timeb t; - #ifdef USE_NEW_SECURE_TIME_FNS + #ifdef USE_NEW_SECURE_TIME_FNS _ftime_s (&t); - #else + #else _ftime (&t); - #endif + #endif correction = (((int64) t.time) * 1000 + t.millitm) - now; -#else + #else struct timeval tv; struct timezone tz; gettimeofday (&tv, &tz); correction = (((int64) tv.tv_sec) * 1000 + tv.tv_usec / 1000) - now; -#endif + #endif } } @@ -2027,30 +2027,14 @@ const String Time::formatted (const String& format) const return CharPointer_UTF32 (buffer.getData()); } -int Time::getYear() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_year + 1900; -} - -int Time::getMonth() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_mon; -} - -int Time::getDayOfMonth() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_mday; -} - -int Time::getDayOfWeek() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_wday; -} - -int Time::getHours() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_hour; -} +int Time::getYear() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_year + 1900; } +int Time::getMonth() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_mon; } +int Time::getDayOfMonth() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_mday; } +int Time::getDayOfWeek() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_wday; } +int Time::getHours() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_hour; } +int Time::getMinutes() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_min; } +int Time::getSeconds() const throw() { return TimeHelpers::extendedModulo (millisSinceEpoch / 1000, 60); } +int Time::getMilliseconds() const throw() { return TimeHelpers::extendedModulo (millisSinceEpoch, 1000); } int Time::getHoursInAmPmFormat() const throw() { @@ -2069,21 +2053,6 @@ bool Time::isAfternoon() const throw() return getHours() >= 12; } -int Time::getMinutes() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_min; -} - -int Time::getSeconds() const throw() -{ - return TimeHelpers::extendedModulo (millisSinceEpoch / 1000, 60); -} - -int Time::getMilliseconds() const throw() -{ - return TimeHelpers::extendedModulo (millisSinceEpoch, 1000); -} - bool Time::isDaylightSavingTime() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_isdst != 0; @@ -2093,10 +2062,10 @@ const String Time::getTimeZone() const throw() { String zone[2]; -#if JUCE_WINDOWS + #if JUCE_WINDOWS _tzset(); - #ifdef USE_NEW_SECURE_TIME_FNS + #ifdef USE_NEW_SECURE_TIME_FNS for (int i = 0; i < 2; ++i) { char name[128] = { 0 }; @@ -2104,17 +2073,17 @@ const String Time::getTimeZone() const throw() _get_tzname (&length, name, 127, i); zone[i] = name; } - #else + #else const char** const zonePtr = (const char**) _tzname; zone[0] = zonePtr[0]; zone[1] = zonePtr[1]; - #endif -#else + #endif + #else tzset(); const char** const zonePtr = (const char**) tzname; zone[0] = zonePtr[0]; zone[1] = zonePtr[1]; -#endif + #endif if (isDaylightSavingTime()) { @@ -4193,12 +4162,12 @@ BEGIN_JUCE_NAMESPACE enum VariantStreamMarkers { - varMarker_Int = 1, - varMarker_BoolTrue = 2, + varMarker_Int = 1, + varMarker_BoolTrue = 2, varMarker_BoolFalse = 3, - varMarker_Double = 4, - varMarker_String = 5, - varMarker_Int64 = 6 + varMarker_Double = 4, + varMarker_String = 5, + varMarker_Int64 = 6 }; class var::VariantType diff --git a/juce_amalgamated.h b/juce_amalgamated.h index aff93e587f..2a09a33d67 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -73,7 +73,7 @@ namespace JuceDummyNamespace {} */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 53 -#define JUCE_BUILDNUMBER 66 +#define JUCE_BUILDNUMBER 67 /** Current Juce version number. @@ -15630,7 +15630,9 @@ private: friend class MessageManager; MessageListener* messageRecipient; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Message); + // Avoid the leak-detector because for plugins, the host can unload our DLL with undelivered + // messages still in the system event queue. These aren't harmful, but can cause annoying assertions. + JUCE_DECLARE_NON_COPYABLE (Message); }; #endif // __JUCE_MESSAGE_JUCEHEADER__ @@ -15681,7 +15683,9 @@ public: private: - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CallbackMessage); + // Avoid the leak-detector because for plugins, the host can unload our DLL with undelivered + // messages still in the system event queue. These aren't harmful, but can cause annoying assertions. + JUCE_DECLARE_NON_COPYABLE (CallbackMessage); }; #endif // __JUCE_CALLBACKMESSAGE_JUCEHEADER__ diff --git a/src/containers/juce_Variant.cpp b/src/containers/juce_Variant.cpp index c282be9d29..51e4a0e4e6 100644 --- a/src/containers/juce_Variant.cpp +++ b/src/containers/juce_Variant.cpp @@ -33,12 +33,12 @@ BEGIN_JUCE_NAMESPACE enum VariantStreamMarkers { - varMarker_Int = 1, - varMarker_BoolTrue = 2, + varMarker_Int = 1, + varMarker_BoolTrue = 2, varMarker_BoolFalse = 3, - varMarker_Double = 4, - varMarker_String = 5, - varMarker_Int64 = 6 + varMarker_Double = 4, + varMarker_String = 5, + varMarker_Int64 = 6 }; //============================================================================== diff --git a/src/core/juce_StandardHeader.h b/src/core/juce_StandardHeader.h index b5ab1820ef..4e7e616dd5 100644 --- a/src/core/juce_StandardHeader.h +++ b/src/core/juce_StandardHeader.h @@ -33,7 +33,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 53 -#define JUCE_BUILDNUMBER 66 +#define JUCE_BUILDNUMBER 67 /** Current Juce version number. diff --git a/src/core/juce_Time.cpp b/src/core/juce_Time.cpp index 5e5adccdc9..7791b049d9 100644 --- a/src/core/juce_Time.cpp +++ b/src/core/juce_Time.cpp @@ -229,20 +229,20 @@ int64 Time::currentTimeMillis() throw() { // get the time once using normal library calls, and store the difference needed to // turn the millisecond counter into a real time. -#if JUCE_WINDOWS + #if JUCE_WINDOWS struct _timeb t; - #ifdef USE_NEW_SECURE_TIME_FNS + #ifdef USE_NEW_SECURE_TIME_FNS _ftime_s (&t); - #else + #else _ftime (&t); - #endif + #endif correction = (((int64) t.time) * 1000 + t.millitm) - now; -#else + #else struct timeval tv; struct timezone tz; gettimeofday (&tv, &tz); correction = (((int64) tv.tv_sec) * 1000 + tv.tv_usec / 1000) - now; -#endif + #endif } } @@ -378,30 +378,14 @@ const String Time::formatted (const String& format) const } //============================================================================== -int Time::getYear() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_year + 1900; -} - -int Time::getMonth() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_mon; -} - -int Time::getDayOfMonth() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_mday; -} - -int Time::getDayOfWeek() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_wday; -} - -int Time::getHours() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_hour; -} +int Time::getYear() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_year + 1900; } +int Time::getMonth() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_mon; } +int Time::getDayOfMonth() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_mday; } +int Time::getDayOfWeek() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_wday; } +int Time::getHours() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_hour; } +int Time::getMinutes() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_min; } +int Time::getSeconds() const throw() { return TimeHelpers::extendedModulo (millisSinceEpoch / 1000, 60); } +int Time::getMilliseconds() const throw() { return TimeHelpers::extendedModulo (millisSinceEpoch, 1000); } int Time::getHoursInAmPmFormat() const throw() { @@ -420,21 +404,6 @@ bool Time::isAfternoon() const throw() return getHours() >= 12; } -int Time::getMinutes() const throw() -{ - return TimeHelpers::millisToLocal (millisSinceEpoch).tm_min; -} - -int Time::getSeconds() const throw() -{ - return TimeHelpers::extendedModulo (millisSinceEpoch / 1000, 60); -} - -int Time::getMilliseconds() const throw() -{ - return TimeHelpers::extendedModulo (millisSinceEpoch, 1000); -} - bool Time::isDaylightSavingTime() const throw() { return TimeHelpers::millisToLocal (millisSinceEpoch).tm_isdst != 0; @@ -444,10 +413,10 @@ const String Time::getTimeZone() const throw() { String zone[2]; -#if JUCE_WINDOWS + #if JUCE_WINDOWS _tzset(); - #ifdef USE_NEW_SECURE_TIME_FNS + #ifdef USE_NEW_SECURE_TIME_FNS for (int i = 0; i < 2; ++i) { char name[128] = { 0 }; @@ -455,17 +424,17 @@ const String Time::getTimeZone() const throw() _get_tzname (&length, name, 127, i); zone[i] = name; } - #else + #else const char** const zonePtr = (const char**) _tzname; zone[0] = zonePtr[0]; zone[1] = zonePtr[1]; - #endif -#else + #endif + #else tzset(); const char** const zonePtr = (const char**) tzname; zone[0] = zonePtr[0]; zone[1] = zonePtr[1]; -#endif + #endif if (isDaylightSavingTime()) { diff --git a/src/events/juce_CallbackMessage.h b/src/events/juce_CallbackMessage.h index 5b7bca9e68..f2f2eacad1 100644 --- a/src/events/juce_CallbackMessage.h +++ b/src/events/juce_CallbackMessage.h @@ -76,7 +76,9 @@ public: private: //============================================================================== - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CallbackMessage); + // Avoid the leak-detector because for plugins, the host can unload our DLL with undelivered + // messages still in the system event queue. These aren't harmful, but can cause annoying assertions. + JUCE_DECLARE_NON_COPYABLE (CallbackMessage); }; diff --git a/src/events/juce_Message.h b/src/events/juce_Message.h index 39ec02a020..f5a3296c57 100644 --- a/src/events/juce_Message.h +++ b/src/events/juce_Message.h @@ -81,7 +81,9 @@ private: friend class MessageManager; MessageListener* messageRecipient; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Message); + // Avoid the leak-detector because for plugins, the host can unload our DLL with undelivered + // messages still in the system event queue. These aren't harmful, but can cause annoying assertions. + JUCE_DECLARE_NON_COPYABLE (Message); };