diff --git a/Builds/MacOSX/Juce.xcodeproj/project.pbxproj b/Builds/MacOSX/Juce.xcodeproj/project.pbxproj
index 95d6fc2654..3dff2a000d 100644
--- a/Builds/MacOSX/Juce.xcodeproj/project.pbxproj
+++ b/Builds/MacOSX/Juce.xcodeproj/project.pbxproj
@@ -521,6 +521,7 @@
C8441B7B3E4CCD4A257B4BFE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_FileLogger.h; path = ../../src/core/juce_FileLogger.h; sourceTree = SOURCE_ROOT; };
5B789AAC295BA4BB6D5AD4A3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Initialisation.cpp; path = ../../src/core/juce_Initialisation.cpp; sourceTree = SOURCE_ROOT; };
92ACFFCCCD1C85A0F8C6F80F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_Initialisation.h; path = ../../src/core/juce_Initialisation.h; sourceTree = SOURCE_ROOT; };
+ DFE0DF77674CB28A2485FFDF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_LeakedObjectDetector.h; path = ../../src/core/juce_LeakedObjectDetector.h; sourceTree = SOURCE_ROOT; };
4555F03DBD059EEDECEF9F85 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Logger.cpp; path = ../../src/core/juce_Logger.cpp; sourceTree = SOURCE_ROOT; };
63F44EC0485FCA050814967E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_Logger.h; path = ../../src/core/juce_Logger.h; sourceTree = SOURCE_ROOT; };
94BDD1E20915D83AA6729D94 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MathsFunctions.h; path = ../../src/core/juce_MathsFunctions.h; sourceTree = SOURCE_ROOT; };
@@ -1245,6 +1246,7 @@
C8441B7B3E4CCD4A257B4BFE,
5B789AAC295BA4BB6D5AD4A3,
92ACFFCCCD1C85A0F8C6F80F,
+ DFE0DF77674CB28A2485FFDF,
4555F03DBD059EEDECEF9F85,
63F44EC0485FCA050814967E,
94BDD1E20915D83AA6729D94,
diff --git a/Builds/VisualStudio2005/Juce.vcproj b/Builds/VisualStudio2005/Juce.vcproj
index 547020d398..c65091856a 100644
--- a/Builds/VisualStudio2005/Juce.vcproj
+++ b/Builds/VisualStudio2005/Juce.vcproj
@@ -386,6 +386,7 @@
+
diff --git a/Builds/VisualStudio2008/Juce.vcproj b/Builds/VisualStudio2008/Juce.vcproj
index 61aca4281c..4958349e45 100644
--- a/Builds/VisualStudio2008/Juce.vcproj
+++ b/Builds/VisualStudio2008/Juce.vcproj
@@ -386,6 +386,7 @@
+
diff --git a/Builds/VisualStudio2008_DLL/Juce.vcproj b/Builds/VisualStudio2008_DLL/Juce.vcproj
index 774a3d752f..2e5b90d277 100644
--- a/Builds/VisualStudio2008_DLL/Juce.vcproj
+++ b/Builds/VisualStudio2008_DLL/Juce.vcproj
@@ -388,6 +388,7 @@
+
diff --git a/Builds/VisualStudio2010/Juce.vcxproj b/Builds/VisualStudio2010/Juce.vcxproj
index 36d1e7d1f4..4437963a89 100644
--- a/Builds/VisualStudio2010/Juce.vcxproj
+++ b/Builds/VisualStudio2010/Juce.vcxproj
@@ -529,6 +529,7 @@
+
diff --git a/Builds/VisualStudio2010/Juce.vcxproj.filters b/Builds/VisualStudio2010/Juce.vcxproj.filters
index beb04ab046..b199e27517 100644
--- a/Builds/VisualStudio2010/Juce.vcxproj.filters
+++ b/Builds/VisualStudio2010/Juce.vcxproj.filters
@@ -1509,6 +1509,9 @@
Juce\Source\core
+
+ Juce\Source\core
+
Juce\Source\core
diff --git a/Builds/iPhone/Juce.xcodeproj/project.pbxproj b/Builds/iPhone/Juce.xcodeproj/project.pbxproj
index 54b8718c74..91aecd946f 100644
--- a/Builds/iPhone/Juce.xcodeproj/project.pbxproj
+++ b/Builds/iPhone/Juce.xcodeproj/project.pbxproj
@@ -521,6 +521,7 @@
C8441B7B3E4CCD4A257B4BFE = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_FileLogger.h; path = ../../src/core/juce_FileLogger.h; sourceTree = SOURCE_ROOT; };
5B789AAC295BA4BB6D5AD4A3 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Initialisation.cpp; path = ../../src/core/juce_Initialisation.cpp; sourceTree = SOURCE_ROOT; };
92ACFFCCCD1C85A0F8C6F80F = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_Initialisation.h; path = ../../src/core/juce_Initialisation.h; sourceTree = SOURCE_ROOT; };
+ DFE0DF77674CB28A2485FFDF = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_LeakedObjectDetector.h; path = ../../src/core/juce_LeakedObjectDetector.h; sourceTree = SOURCE_ROOT; };
4555F03DBD059EEDECEF9F85 = { isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = juce_Logger.cpp; path = ../../src/core/juce_Logger.cpp; sourceTree = SOURCE_ROOT; };
63F44EC0485FCA050814967E = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_Logger.h; path = ../../src/core/juce_Logger.h; sourceTree = SOURCE_ROOT; };
94BDD1E20915D83AA6729D94 = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = juce_MathsFunctions.h; path = ../../src/core/juce_MathsFunctions.h; sourceTree = SOURCE_ROOT; };
@@ -1245,6 +1246,7 @@
C8441B7B3E4CCD4A257B4BFE,
5B789AAC295BA4BB6D5AD4A3,
92ACFFCCCD1C85A0F8C6F80F,
+ DFE0DF77674CB28A2485FFDF,
4555F03DBD059EEDECEF9F85,
63F44EC0485FCA050814967E,
94BDD1E20915D83AA6729D94,
diff --git a/Juce.jucer b/Juce.jucer
index a8068b6ce4..51f3e6304a 100644
--- a/Juce.jucer
+++ b/Juce.jucer
@@ -427,6 +427,8 @@
file="src/core/juce_Initialisation.cpp"/>
+
currentProject;
@@ -85,6 +82,8 @@ private:
return "projectWindowPos_" + currentProject->getProjectUID();
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow);
};
diff --git a/extras/Jucer (experimental)/Source/Application/jucer_OpenDocumentManager.h b/extras/Jucer (experimental)/Source/Application/jucer_OpenDocumentManager.h
index 8b01ca4880..38b9d41079 100644
--- a/extras/Jucer (experimental)/Source/Application/jucer_OpenDocumentManager.h
+++ b/extras/Jucer (experimental)/Source/Application/jucer_OpenDocumentManager.h
@@ -107,13 +107,13 @@ public:
void registerType (DocumentType* type);
- //==============================================================================
- juce_UseDebuggingNewOperator
private:
OwnedArray types;
OwnedArray documents;
Array listeners;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenDocumentManager);
};
diff --git a/extras/Jucer (experimental)/Source/BinaryData/jucer_AudioPluginFilterTemplate.h b/extras/Jucer (experimental)/Source/BinaryData/jucer_AudioPluginFilterTemplate.h
index 54dbc8aade..54e6d83ea7 100644
--- a/extras/Jucer (experimental)/Source/BinaryData/jucer_AudioPluginFilterTemplate.h
+++ b/extras/Jucer (experimental)/Source/BinaryData/jucer_AudioPluginFilterTemplate.h
@@ -64,9 +64,9 @@ public:
void getStateInformation (MemoryBlock& destData);
void setStateInformation (const void* data, int sizeInBytes);
+private:
//==============================================================================
- juce_UseDebuggingNewOperator
-
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FILTERCLASSNAME);
};
#endif // HEADERGUARD
diff --git a/extras/Jucer (experimental)/Source/BinaryData/jucer_WindowTemplate.h b/extras/Jucer (experimental)/Source/BinaryData/jucer_WindowTemplate.h
index 5c0e0e74ac..a4df1854a9 100644
--- a/extras/Jucer (experimental)/Source/BinaryData/jucer_WindowTemplate.h
+++ b/extras/Jucer (experimental)/Source/BinaryData/jucer_WindowTemplate.h
@@ -32,12 +32,9 @@ public:
implementation calls the superclass's method.
*/
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
- WINDOWCLASS (const WINDOWCLASS&);
- WINDOWCLASS& operator= (const WINDOWCLASS&);
+ //==============================================================================
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WINDOWCLASS)
};
diff --git a/extras/Jucer (experimental)/Source/Code Editor/jucer_SourceCodeEditor.h b/extras/Jucer (experimental)/Source/Code Editor/jucer_SourceCodeEditor.h
index e16bd2379e..f643d89315 100644
--- a/extras/Jucer (experimental)/Source/Code Editor/jucer_SourceCodeEditor.h
+++ b/extras/Jucer (experimental)/Source/Code Editor/jucer_SourceCodeEditor.h
@@ -48,11 +48,10 @@ public:
void resized();
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
CodeEditorComponent editor;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SourceCodeEditor);
};
diff --git a/extras/Jucer (experimental)/Source/Project/jucer_GroupInformationComponent.cpp b/extras/Jucer (experimental)/Source/Project/jucer_GroupInformationComponent.cpp
index 520c66f7a4..b97f8b6b8b 100644
--- a/extras/Jucer (experimental)/Source/Project/jucer_GroupInformationComponent.cpp
+++ b/extras/Jucer (experimental)/Source/Project/jucer_GroupInformationComponent.cpp
@@ -95,7 +95,7 @@ public:
{
int x = getHeight() + 6;
- item.getIcon()->drawWithin (g, Rectangle (2, 2, x - 4, getHeight() - 4),
+ item.getIcon()->drawWithin (g, Rectangle (2.0f, 2.0f, x - 4.0f, getHeight() - 4.0f),
RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, 1.0f);
g.setColour (Colours::black);
diff --git a/extras/Jucer (experimental)/Source/Project/jucer_GroupInformationComponent.h b/extras/Jucer (experimental)/Source/Project/jucer_GroupInformationComponent.h
index 8f37803685..df64b71dfd 100644
--- a/extras/Jucer (experimental)/Source/Project/jucer_GroupInformationComponent.h
+++ b/extras/Jucer (experimental)/Source/Project/jucer_GroupInformationComponent.h
@@ -52,16 +52,11 @@ public:
void valueTreeChildrenChanged (ValueTree& treeWhoseChildHasChanged);
void valueTreeParentChanged (ValueTree& treeWhoseParentHasChanged);
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
Project::Item item;
ListBox list;
- //==============================================================================
- GroupInformationComponent (const GroupInformationComponent&);
- const GroupInformationComponent& operator= (const GroupInformationComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GroupInformationComponent);
};
diff --git a/extras/Jucer (experimental)/Source/Project/jucer_ProjectContentComponent.h b/extras/Jucer (experimental)/Source/Project/jucer_ProjectContentComponent.h
index 756ffcc9f9..81f56d4e0a 100644
--- a/extras/Jucer (experimental)/Source/Project/jucer_ProjectContentComponent.h
+++ b/extras/Jucer (experimental)/Source/Project/jucer_ProjectContentComponent.h
@@ -65,9 +65,6 @@ public:
bool isCommandActive (const CommandID commandID);
bool perform (const InvocationInfo& info);
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
ScopedPointer projectTree;
Project* project;
@@ -77,6 +74,8 @@ private:
ScopedPointer resizerBar;
void updateMainWindowTitle();
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectContentComponent);
};
diff --git a/extras/Jucer (experimental)/Source/Project/jucer_ProjectExport_MSVC.h b/extras/Jucer (experimental)/Source/Project/jucer_ProjectExport_MSVC.h
index 19b5e351f6..4d8171f9e5 100644
--- a/extras/Jucer (experimental)/Source/Project/jucer_ProjectExport_MSVC.h
+++ b/extras/Jucer (experimental)/Source/Project/jucer_ProjectExport_MSVC.h
@@ -351,14 +351,14 @@ protected:
if (++count == 8)
{
- dataBlock.writeByte (mask);
+ dataBlock.writeByte ((char) mask);
count = 0;
mask = 0;
}
}
if (mask != 0)
- dataBlock.writeByte (mask);
+ dataBlock.writeByte ((char) mask);
for (int i = maskStride - w / 8; --i >= 0;)
dataBlock.writeByte (0);
diff --git a/extras/Jucer (experimental)/Source/Project/jucer_ProjectInformationComponent.cpp b/extras/Jucer (experimental)/Source/Project/jucer_ProjectInformationComponent.cpp
index 5011cfb2e6..46ba5fa523 100644
--- a/extras/Jucer (experimental)/Source/Project/jucer_ProjectInformationComponent.cpp
+++ b/extras/Jucer (experimental)/Source/Project/jucer_ProjectInformationComponent.cpp
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created for JUCE version: JUCE v1.52.92
+ Created for JUCE version: JUCE v1.52.97
------------------------------------------------------------------------------
diff --git a/extras/Jucer (experimental)/Source/Project/jucer_ProjectInformationComponent.h b/extras/Jucer (experimental)/Source/Project/jucer_ProjectInformationComponent.h
index ab040ef048..8b85103343 100644
--- a/extras/Jucer (experimental)/Source/Project/jucer_ProjectInformationComponent.h
+++ b/extras/Jucer (experimental)/Source/Project/jucer_ProjectInformationComponent.h
@@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
- Created for JUCE version: JUCE v1.52.92
+ Created for JUCE version: JUCE v1.52.97
------------------------------------------------------------------------------
@@ -51,10 +51,8 @@ public:
void paint (Graphics& g);
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
+ //==============================================================================
//[UserVariables] -- You can add your own custom variables in this section.
Project& project;
@@ -72,9 +70,7 @@ private:
TextButton saveAndOpenButton;
//==============================================================================
- // (prevent copy constructor and operator= being generated..)
- ProjectInformationComponent (const ProjectInformationComponent&);
- ProjectInformationComponent& operator= (const ProjectInformationComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectInformationComponent);
};
diff --git a/extras/Jucer (experimental)/Source/Utility/jucer_MiscUtilities.h b/extras/Jucer (experimental)/Source/Utility/jucer_MiscUtilities.h
index a8f83e87fd..99def0402f 100644
--- a/extras/Jucer (experimental)/Source/Utility/jucer_MiscUtilities.h
+++ b/extras/Jucer (experimental)/Source/Utility/jucer_MiscUtilities.h
@@ -134,11 +134,8 @@ public:
{
}
- juce_UseDebuggingNewOperator
-
private:
- JucerToolbarButton (const JucerToolbarButton&);
- JucerToolbarButton& operator= (const JucerToolbarButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JucerToolbarButton);
};
@@ -235,8 +232,6 @@ public:
/** @internal */
void handleAsyncUpdate();
- juce_UseDebuggingNewOperator
-
private:
//==============================================================================
struct ComponentPosition
@@ -260,6 +255,5 @@ private:
OwnedArray components;
OwnedArray markers;
- RelativeRectangleLayoutManager (const RelativeRectangleLayoutManager&);
- RelativeRectangleLayoutManager& operator= (const RelativeRectangleLayoutManager&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RelativeRectangleLayoutManager);
};
diff --git a/extras/Jucer (experimental)/Source/Utility/jucer_StoredSettings.h b/extras/Jucer (experimental)/Source/Utility/jucer_StoredSettings.h
index 7cd5421615..ab5251fc53 100644
--- a/extras/Jucer (experimental)/Source/Utility/jucer_StoredSettings.h
+++ b/extras/Jucer (experimental)/Source/Utility/jucer_StoredSettings.h
@@ -73,8 +73,6 @@ public:
const Image getFallbackImage();
const Drawable* getImageFileIcon();
- //==============================================================================
- juce_UseDebuggingNewOperator
private:
ScopedPointer props;
@@ -82,6 +80,8 @@ private:
ScopedPointer imageFileIcon;
Image fallbackImage;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StoredSettings);
};
diff --git a/extras/Jucer (experimental)/Source/Utility/jucer_ValueSourceHelpers.h b/extras/Jucer (experimental)/Source/Utility/jucer_ValueSourceHelpers.h
index e3e55b099c..7d3db1a998 100644
--- a/extras/Jucer (experimental)/Source/Utility/jucer_ValueSourceHelpers.h
+++ b/extras/Jucer (experimental)/Source/Utility/jucer_ValueSourceHelpers.h
@@ -41,8 +41,6 @@ public:
sourceValue.addListener (this);
}
- ~NumericValueSource() {}
-
void valueChanged (Value&) { sendChangeMessage (true); }
const var getValue() const { return (Type) sourceValue.getValue(); }
@@ -55,13 +53,10 @@ public:
}
//==============================================================================
- juce_UseDebuggingNewOperator
-
protected:
Value sourceValue;
- NumericValueSource (const NumericValueSource&);
- const NumericValueSource& operator= (const NumericValueSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NumericValueSource);
};
diff --git a/extras/audio plugin host/Source/GraphEditorPanel.h b/extras/audio plugin host/Source/GraphEditorPanel.h
index e47e9eba3e..2b2521fd01 100644
--- a/extras/audio plugin host/Source/GraphEditorPanel.h
+++ b/extras/audio plugin host/Source/GraphEditorPanel.h
@@ -65,14 +65,11 @@ public:
void endDraggingConnector (const MouseEvent& e);
//==============================================================================
- juce_UseDebuggingNewOperator
-
private:
FilterGraph& graph;
ConnectorComponent* draggingConnector;
- GraphEditorPanel (const GraphEditorPanel&);
- GraphEditorPanel& operator= (const GraphEditorPanel&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GraphEditorPanel);
};
@@ -98,10 +95,8 @@ public:
//==============================================================================
void resized();
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
+ //==============================================================================
AudioDeviceManager* deviceManager;
AudioProcessorPlayer graphPlayer;
MidiKeyboardState keyState;
@@ -109,6 +104,8 @@ private:
GraphEditorPanel* graphPanel;
Component* keyboardComp;
Component* statusBar;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GraphDocumentComponent);
};
//==============================================================================
diff --git a/extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp b/extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp
index ea360eb0ad..d1d169a1ea 100644
--- a/extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp
+++ b/extras/audio plugins/wrapper/RTAS/juce_RTAS_Wrapper.cpp
@@ -403,14 +403,15 @@ public:
return true;
}
#endif
- //==============================================================================
- juce_UseDebuggingNewOperator
private:
+ //==============================================================================
void* const hostWindow;
void* nsWindow;
JuceCustomUIView* const owner;
int titleW, titleH;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EditorCompWrapper);
};
};
diff --git a/extras/audio plugins/wrapper/Standalone/juce_AudioFilterStreamer.h b/extras/audio plugins/wrapper/Standalone/juce_AudioFilterStreamer.h
index f753f17589..be6ab5729a 100644
--- a/extras/audio plugins/wrapper/Standalone/juce_AudioFilterStreamer.h
+++ b/extras/audio plugins/wrapper/Standalone/juce_AudioFilterStreamer.h
@@ -58,12 +58,11 @@ public:
*/
void setFilter (AudioProcessor* filterToStream);
-
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
+ //==============================================================================
ScopedPointer player;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFilterStreamingDeviceManager);
};
diff --git a/extras/audio plugins/wrapper/Standalone/juce_StandaloneFilterWindow.h b/extras/audio plugins/wrapper/Standalone/juce_StandaloneFilterWindow.h
index 81a491a264..539fba98c6 100644
--- a/extras/audio plugins/wrapper/Standalone/juce_StandaloneFilterWindow.h
+++ b/extras/audio plugins/wrapper/Standalone/juce_StandaloneFilterWindow.h
@@ -74,8 +74,6 @@ public:
/** @internal */
void resized();
- juce_UseDebuggingNewOperator
-
private:
ScopedPointer filter;
ScopedPointer deviceManager;
@@ -83,8 +81,7 @@ private:
void deleteFilter();
- StandaloneFilterWindow (const StandaloneFilterWindow&);
- StandaloneFilterWindow& operator= (const StandaloneFilterWindow&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StandaloneFilterWindow);
};
#endif // __JUCE_STANDALONEFILTERWINDOW_JUCEHEADER__
diff --git a/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp b/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp
index 14e5bf5fef..2f68b91ef3 100644
--- a/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp
+++ b/extras/audio plugins/wrapper/VST/juce_VST_Wrapper.cpp
@@ -1374,17 +1374,15 @@ public:
}
#endif
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
+ //==============================================================================
JuceVSTWrapper& wrapper;
ScopedPointer editor;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EditorCompWrapper);
};
//==============================================================================
- juce_UseDebuggingNewOperator
-
private:
AudioProcessor* filter;
JUCE_NAMESPACE::MemoryBlock chunkMemory;
@@ -1465,6 +1463,8 @@ private:
#else
HWND hostWindow;
#endif
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceVSTWrapper);
};
//==============================================================================
diff --git a/extras/juce demo/Source/MainDemoWindow.cpp b/extras/juce demo/Source/MainDemoWindow.cpp
index b535ecb40e..ff24f1bb83 100644
--- a/extras/juce demo/Source/MainDemoWindow.cpp
+++ b/extras/juce demo/Source/MainDemoWindow.cpp
@@ -450,8 +450,6 @@ public:
return true;
}
- juce_UseDebuggingNewOperator
-
private:
//==============================================================================
MainDemoWindow* mainWindow;
@@ -486,6 +484,8 @@ private:
useNativeMenus = 0x200e,
goToKioskMode = 0x200f
};
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentComp);
};
//==============================================================================
diff --git a/extras/juce demo/Source/demos/CodeEditorDemo.cpp b/extras/juce demo/Source/demos/CodeEditorDemo.cpp
index 555ab336ae..99a5c5d3b6 100644
--- a/extras/juce demo/Source/demos/CodeEditorDemo.cpp
+++ b/extras/juce demo/Source/demos/CodeEditorDemo.cpp
@@ -69,9 +69,6 @@ public:
fileChooser.setBounds (10, 10, getWidth() - 20, 25);
}
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
// this is the document that the editor component is showing
CodeDocument codeDocument;
@@ -83,6 +80,8 @@ private:
ScopedPointer editor;
FilenameComponent fileChooser;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CodeEditorDemo);
};
diff --git a/extras/juce demo/Source/demos/DragAndDropDemo.cpp b/extras/juce demo/Source/demos/DragAndDropDemo.cpp
index 38aaf2afee..f7a84c68a3 100644
--- a/extras/juce demo/Source/demos/DragAndDropDemo.cpp
+++ b/extras/juce demo/Source/demos/DragAndDropDemo.cpp
@@ -231,14 +231,11 @@ public:
target.setBounds (getWidth() - 260, getHeight() - 160, 250, 150);
}
- //==============================================================================
- // (need to put this in to disambiguate the new/delete operators used in the
- // two base classes).
- juce_UseDebuggingNewOperator
-
private:
DragAndDropDemoSource source;
DragAndDropDemoTarget target;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DragAndDropDemo);
};
diff --git a/extras/juce demo/Source/demos/InterprocessCommsDemo.cpp b/extras/juce demo/Source/demos/InterprocessCommsDemo.cpp
index eb94552329..fc7c231509 100644
--- a/extras/juce demo/Source/demos/InterprocessCommsDemo.cpp
+++ b/extras/juce demo/Source/demos/InterprocessCommsDemo.cpp
@@ -294,9 +294,6 @@ public:
OwnedArray activeConnections;
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
ComboBox modeSelector;
TextButton sendButton;
@@ -304,6 +301,8 @@ private:
Label modeLabel, pipeLabel, numberLabel, hostLabel;
ScopedPointer server;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InterprocessCommsDemo);
};
diff --git a/extras/juce demo/Source/demos/TableDemo.cpp b/extras/juce demo/Source/demos/TableDemo.cpp
index fcebdc092c..443f5eb5b1 100644
--- a/extras/juce demo/Source/demos/TableDemo.cpp
+++ b/extras/juce demo/Source/demos/TableDemo.cpp
@@ -194,8 +194,6 @@ public:
table.setBoundsInset (BorderSize (8));
}
- //==============================================================================
- juce_UseDebuggingNewOperator
private:
TableListBox table; // the table component itself
@@ -311,6 +309,8 @@ private:
return String::empty;
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TableDemoComponent);
};
diff --git a/extras/juce demo/Source/demos/ThreadingDemo.cpp b/extras/juce demo/Source/demos/ThreadingDemo.cpp
index 899049e1d2..d91d5aa297 100644
--- a/extras/juce demo/Source/demos/ThreadingDemo.cpp
+++ b/extras/juce demo/Source/demos/ThreadingDemo.cpp
@@ -29,11 +29,6 @@
//==============================================================================
class BouncingBallComp : public Component
{
- float x, y, size, dx, dy, w, h, parentWidth, parentHeight;
- float innerX, innerY;
- Colour colour;
- Thread::ThreadID threadId;
-
public:
BouncingBallComp()
{
@@ -110,7 +105,13 @@ public:
repaint();
}
- juce_UseDebuggingNewOperator
+private:
+ float x, y, size, dx, dy, w, h, parentWidth, parentHeight;
+ float innerX, innerY;
+ Colour colour;
+ Thread::ThreadID threadId;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BouncingBallComp);
};
@@ -118,8 +119,6 @@ public:
class DemoThread : public BouncingBallComp,
public Thread
{
- int interval;
-
public:
DemoThread()
: Thread ("Juce Demo Thread")
@@ -161,7 +160,10 @@ public:
}
}
- juce_UseDebuggingNewOperator
+private:
+ int interval;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoThread);
};
@@ -205,7 +207,8 @@ public:
// In this case there's no need to do anything here.
}
- juce_UseDebuggingNewOperator
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoThreadPoolJob);
};
//==============================================================================
diff --git a/extras/juce demo/Source/demos/TreeViewDemo.cpp b/extras/juce demo/Source/demos/TreeViewDemo.cpp
index ddd746eaef..8bd2ed74b0 100644
--- a/extras/juce demo/Source/demos/TreeViewDemo.cpp
+++ b/extras/juce demo/Source/demos/TreeViewDemo.cpp
@@ -238,8 +238,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
ScopedPointer treeXml;
@@ -251,6 +249,8 @@ private:
TimeSliceThread thread;
TextButton typeButton;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TreeViewDemo);
};
diff --git a/extras/juce demo/Source/demos/WebBrowserDemo.cpp b/extras/juce demo/Source/demos/WebBrowserDemo.cpp
index ed58b18617..b5829a2f0e 100644
--- a/extras/juce demo/Source/demos/WebBrowserDemo.cpp
+++ b/extras/juce demo/Source/demos/WebBrowserDemo.cpp
@@ -52,14 +52,10 @@ public:
return true;
}
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
TextEditor& addressTextBox;
- DemoBrowserComponent (DemoBrowserComponent&);
- DemoBrowserComponent& operator= (const DemoBrowserComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoBrowserComponent);
};
@@ -129,13 +125,13 @@ public:
webView->goToURL (addressTextBox.getText());
}
- juce_UseDebuggingNewOperator
-
private:
ScopedPointer webView;
TextEditor addressTextBox;
TextButton goButton, backButton, forwardButton;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebBrowserDemo);
};
diff --git a/extras/juce demo/Source/demos/WidgetsDemo.cpp b/extras/juce demo/Source/demos/WidgetsDemo.cpp
index 2ed0869065..d93cdfe5e7 100644
--- a/extras/juce demo/Source/demos/WidgetsDemo.cpp
+++ b/extras/juce demo/Source/demos/WidgetsDemo.cpp
@@ -107,9 +107,9 @@ public:
{
}
- void mouseDown (const MouseEvent&)
+ void mouseDown (const MouseEvent& e)
{
- dragger.startDraggingComponent (this, 0);
+ dragger.startDraggingComponent (this, e, 0);
}
void mouseDrag (const MouseEvent& e)
diff --git a/juce.h b/juce.h
index ca5d497039..65e6cc49a1 100644
--- a/juce.h
+++ b/juce.h
@@ -61,6 +61,11 @@ BEGIN_JUCE_NAMESPACE
#pragma pack (pop)
#endif
+#if JUCE_DLL
+ #undef JUCE_LEAK_DETECTOR(OwnerClass)
+ #define JUCE_LEAK_DETECTOR(OwnerClass)
+#endif
+
END_JUCE_NAMESPACE
diff --git a/juce_Config.h b/juce_Config.h
index 78a44d5df2..0723348a7d 100644
--- a/juce_Config.h
+++ b/juce_Config.h
@@ -274,10 +274,11 @@
#endif
//=============================================================================
-/** JUCE_CHECK_MEMORY_LEAKS: Enables a memory-leak check when an app terminates.
- (Currently, this only affects Windows builds in debug mode).
+/** JUCE_CHECK_MEMORY_LEAKS: Enables a memory-leak check for certain objects when
+ the app terminates. See the LeakedObjectDetector class and the JUCE_LEAK_DETECTOR
+ macro for more details about enabling leak checking for specific classes.
*/
-#ifndef JUCE_CHECK_MEMORY_LEAKS
+#if JUCE_DEBUG && ! defined (JUCE_CHECK_MEMORY_LEAKS)
#define JUCE_CHECK_MEMORY_LEAKS 1
#endif
diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp
index 18021842f7..810024f1dc 100644
--- a/juce_amalgamated.cpp
+++ b/juce_amalgamated.cpp
@@ -428,10 +428,11 @@
#define JUCE_INCLUDE_JPEGLIB_CODE 1
#endif
-/** JUCE_CHECK_MEMORY_LEAKS: Enables a memory-leak check when an app terminates.
- (Currently, this only affects Windows builds in debug mode).
+/** JUCE_CHECK_MEMORY_LEAKS: Enables a memory-leak check for certain objects when
+ the app terminates. See the LeakedObjectDetector class and the JUCE_LEAK_DETECTOR
+ macro for more details about enabling leak checking for specific classes.
*/
-#ifndef JUCE_CHECK_MEMORY_LEAKS
+#if JUCE_DEBUG && ! defined (JUCE_CHECK_MEMORY_LEAKS)
#define JUCE_CHECK_MEMORY_LEAKS 1
#endif
@@ -1716,7 +1717,7 @@ void juce_Free (void* const block)
free (block);
}
-#if JUCE_DEBUG && JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS
+#if JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS
void* juce_DebugMalloc (const int size, const char* file, const int line)
{
@@ -9522,8 +9523,6 @@ public:
return true;
}
- juce_UseDebuggingNewOperator
-
private:
String server, headers;
MemoryBlock postData;
@@ -9594,8 +9593,7 @@ private:
}
}
- WebInputStream (const WebInputStream&);
- WebInputStream& operator= (const WebInputStream&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebInputStream);
};
InputStream* URL::createInputStream (const bool usePostCommand,
@@ -21032,13 +21030,10 @@ public:
return true;
}
- juce_UseDebuggingNewOperator
-
private:
- AiffAudioFormatReader (const AiffAudioFormatReader&);
- AiffAudioFormatReader& operator= (const AiffAudioFormatReader&);
-
static inline int chunkName (const char* const name) { return (int) ByteOrder::littleEndianInt (name); }
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AiffAudioFormatReader);
};
class AiffAudioFormatWriter : public AudioFormatWriter
@@ -21101,8 +21096,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
MemoryBlock tempBlock;
uint32 lengthInSamples, bytesWritten;
@@ -21111,9 +21104,6 @@ private:
static inline int chunkName (const char* const name) { return (int) ByteOrder::littleEndianInt (name); }
- AiffAudioFormatWriter (const AiffAudioFormatWriter&);
- AiffAudioFormatWriter& operator= (const AiffAudioFormatWriter&);
-
void writeHeader()
{
const bool couldSeekOk = output->setPosition (headerPosition);
@@ -21187,6 +21177,8 @@ private:
jassert (output->getPosition() == headerLen);
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AiffAudioFormatWriter);
};
AiffAudioFormat::AiffAudioFormat()
@@ -22610,7 +22602,7 @@ struct ThumbnailCacheEntry
uint32 lastUsed;
MemoryBlock data;
- juce_UseDebuggingNewOperator
+ JUCE_LEAK_DETECTOR (ThumbnailCacheEntry);
};
AudioThumbnailCache::AudioThumbnailCache (const int maxNumThumbsToStore_)
@@ -22975,8 +22967,6 @@ public:
return ok;
}
- juce_UseDebuggingNewOperator
-
bool ok;
private:
@@ -23010,8 +23000,7 @@ private:
#endif
}
- QTAudioReader (const QTAudioReader&);
- QTAudioReader& operator= (const QTAudioReader&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (QTAudioReader);
};
QuickTimeAudioFormat::QuickTimeAudioFormat()
@@ -23446,8 +23435,6 @@ public:
int64 bwavChunkStart, bwavSize;
- juce_UseDebuggingNewOperator
-
private:
ScopedPointer converter;
int bytesPerFrame;
@@ -23455,8 +23442,7 @@ private:
static inline int chunkName (const char* const name) { return (int) ByteOrder::littleEndianInt (name); }
- WavAudioFormatReader (const WavAudioFormatReader&);
- WavAudioFormatReader& operator= (const WavAudioFormatReader&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavAudioFormatReader);
};
class WavAudioFormatWriter : public AudioFormatWriter
@@ -23530,8 +23516,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
ScopedPointer converter;
MemoryBlock tempBlock, bwavChunk, smplChunk;
@@ -23586,8 +23570,7 @@ private:
usesFloatingPointData = (bitsPerSample == 32);
}
- WavAudioFormatWriter (const WavAudioFormatWriter&);
- WavAudioFormatWriter& operator= (const WavAudioFormatWriter&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WavAudioFormatWriter);
};
WavAudioFormat::WavAudioFormat()
@@ -31543,9 +31526,8 @@ public:
void setStateInformation (const void* data, int sizeInBytes);
void setCurrentProgramStateInformation (const void* data, int sizeInBytes);
- juce_UseDebuggingNewOperator
-
private:
+
friend class AudioUnitPluginWindowCarbon;
friend class AudioUnitPluginWindowCocoa;
friend class AudioUnitPluginFormat;
@@ -31677,6 +31659,8 @@ private:
const String getCategory() const;
AudioUnitPluginInstance (const String& fileOrIdentifier);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioUnitPluginInstance);
};
AudioUnitPluginInstance::AudioUnitPluginInstance (const String& fileOrIdentifier)
@@ -32342,9 +32326,8 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
+
AudioUnitPluginInstance& plugin;
ComponentRecord* componentRecord;
AudioUnitCarbonView viewComponent;
@@ -32398,6 +32381,8 @@ private:
friend class InnerWrapperComponent;
ScopedPointer innerWrapper;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioUnitPluginWindowCarbon);
};
#endif
@@ -33362,8 +33347,6 @@ public:
close();
}
- juce_UseDebuggingNewOperator
-
#if JUCE_WINDOWS || JUCE_LINUX
void* hModule;
String fullParentDirectoryPathName;
@@ -33617,6 +33600,9 @@ public:
#endif
#endif
+
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ModuleHandle);
};
/**
@@ -33711,9 +33697,8 @@ public:
void handleAsyncUpdate();
VstIntPtr handleCallback (VstInt32 opcode, VstInt32 index, VstInt32 value, void *ptr, float opt);
- juce_UseDebuggingNewOperator
-
private:
+
friend class VSTPluginWindow;
friend class VSTPluginFormat;
@@ -33754,6 +33739,7 @@ private:
void setPower (const bool on);
VSTPluginInstance (const ReferenceCountedObjectPtr & module);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VSTPluginInstance);
};
VSTPluginInstance::VSTPluginInstance (const ReferenceCountedObjectPtr & module_)
@@ -34280,8 +34266,6 @@ public:
#endif
}
- juce_UseDebuggingNewOperator
-
private:
VSTPluginInstance& plugin;
bool isOpen, wasShowing, recursiveResize;
@@ -34789,6 +34773,9 @@ private:
innerWrapper->setSize (getWidth(), getHeight());
}
#endif
+
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VSTPluginWindow);
};
AudioProcessorEditor* VSTPluginInstance::createEditor()
@@ -36488,7 +36475,7 @@ public:
const OwnedArray & sharedMidiBuffers,
const int numSamples) = 0;
- juce_UseDebuggingNewOperator
+ JUCE_LEAK_DETECTOR (AudioGraphRenderingOp);
};
class ClearChannelOp : public AudioGraphRenderingOp
@@ -36698,9 +36685,8 @@ public:
int getNumBuffersNeeded() const { return nodeIds.size(); }
int getNumMidiBuffersNeeded() const { return midiNodeIds.size(); }
- juce_UseDebuggingNewOperator
-
private:
+
AudioProcessorGraph& graph;
const Array& orderedNodes;
Array nodeIds, channels, midiNodeIds;
@@ -37078,8 +37064,7 @@ private:
}
}
- RenderingOpSequenceCalculator (const RenderingOpSequenceCalculator&);
- RenderingOpSequenceCalculator& operator= (const RenderingOpSequenceCalculator&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RenderingOpSequenceCalculator);
};
}
@@ -37655,8 +37640,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
class ParamSlider : public Slider
@@ -37685,14 +37668,12 @@ private:
return owner.getParameterText (index);
}
- juce_UseDebuggingNewOperator
-
private:
+
AudioProcessor& owner;
const int index;
- ParamSlider (const ParamSlider&);
- ParamSlider& operator= (const ParamSlider&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ParamSlider);
};
AudioProcessor& owner;
@@ -37700,8 +37681,7 @@ private:
bool volatile paramHasChanged;
ParamSlider slider;
- ProcessorParameterPropertyComp (const ProcessorParameterPropertyComp&);
- ProcessorParameterPropertyComp& operator= (const ProcessorParameterPropertyComp&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProcessorParameterPropertyComp);
};
GenericAudioProcessorEditor::GenericAudioProcessorEditor (AudioProcessor* const owner_)
@@ -39208,13 +39188,10 @@ public:
events->releaseEvent.wait();
}
- juce_UseDebuggingNewOperator
-
private:
ReferenceCountedObjectPtr events;
- BlockingMessage (const BlockingMessage&);
- BlockingMessage& operator= (const BlockingMessage&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BlockingMessage);
};
MessageManagerLock::MessageManagerLock (Thread* const threadToCheck)
@@ -39942,31 +39919,6 @@ private:
MouseListenerList& operator= (const MouseListenerList&);
};
-#if JUCE_DEBUG
-namespace
-{
- class ComponentLeakDetector
- {
- public:
- ComponentLeakDetector() : componentCount (0) {}
-
- ~ComponentLeakDetector()
- {
- /* If you hit this assertion, then you've leaked some Components.
-
- In most cases this will be due to bad coding practices like using the manually deleting
- objects rather than using ScopedPointers or embedded member objects to manage their lifetimes.
- */
- jassert (componentCount <= 0);
- }
-
- int componentCount;
- };
-
- ComponentLeakDetector leakDetector;
-}
-#endif
-
class Component::ComponentHelpers
{
public:
@@ -40158,9 +40110,6 @@ Component::Component()
componentFlags_ (0),
componentTransparency (0)
{
- #if JUCE_DEBUG
- leakDetector.componentCount++;
- #endif
}
Component::Component (const String& name)
@@ -40172,9 +40121,6 @@ Component::Component (const String& name)
componentFlags_ (0),
componentTransparency (0)
{
- #if JUCE_DEBUG
- leakDetector.componentCount++;
- #endif
}
Component::~Component()
@@ -40199,18 +40145,6 @@ Component::~Component()
for (int i = childComponentList_.size(); --i >= 0;)
childComponentList_.getUnchecked(i)->parentComponent_ = 0;
-
- #if JUCE_DEBUG
- leakDetector.componentCount--;
-
- /* If you hit this assertion, then you've somehow managed to delete more components than
- you have created.
-
- In most cases this will be due to bad coding practices like manually deleting your objects
- rather than using ScopedPointers or embedded member objects to manage their lifetimes.
- */
- jassert (leakDetector.componentCount >= 0);
- #endif
}
void Component::setName (const String& name)
@@ -40741,14 +40675,15 @@ void Component::setBounds (const int x, const int y, int w, int h)
const bool wasResized = (getWidth() != w || getHeight() != h);
const bool wasMoved = (getX() != x || getY() != y);
-#if JUCE_DEBUG
+ #if JUCE_DEBUG
// It's a very bad idea to try to resize a window during its paint() method!
jassert (! (flags.isInsidePaintCall && wasResized && isOnDesktop()));
-#endif
+ #endif
if (wasMoved || wasResized)
{
- if (flags.visibleFlag)
+ const bool showing = isShowing();
+ if (showing)
{
// send a fake mouse move to trigger enter/exit messages if needed..
sendFakeMouseMove();
@@ -40759,10 +40694,13 @@ void Component::setBounds (const int x, const int y, int w, int h)
bounds_.setBounds (x, y, w, h);
- if (wasResized)
- repaint();
- else if (! flags.hasHeavyweightPeerFlag)
- repaintParent();
+ if (showing)
+ {
+ if (wasResized)
+ repaint();
+ else if (! flags.hasHeavyweightPeerFlag)
+ repaintParent();
+ }
if (flags.hasHeavyweightPeerFlag)
{
@@ -41116,36 +41054,44 @@ Component* Component::removeChildComponent (const int index)
if (child != 0)
{
- sendFakeMouseMove();
- child->repaintParent();
+ const bool childShowing = child->isShowing();
+
+ if (childShowing)
+ {
+ sendFakeMouseMove();
+ child->repaintParent();
+ }
childComponentList_.remove (index);
child->parentComponent_ = 0;
- JUCE_TRY
+ if (childShowing)
{
- if ((currentlyFocusedComponent == child)
- || child->isParentOf (currentlyFocusedComponent))
+ JUCE_TRY
{
- // get rid first to force the grabKeyboardFocus to change to us.
- giveAwayFocus();
- grabKeyboardFocus();
+ if ((currentlyFocusedComponent == child)
+ || child->isParentOf (currentlyFocusedComponent))
+ {
+ // get rid first to force the grabKeyboardFocus to change to us.
+ giveAwayFocus();
+ grabKeyboardFocus();
+ }
}
+ #if JUCE_CATCH_UNHANDLED_EXCEPTIONS
+ catch (const std::exception& e)
+ {
+ currentlyFocusedComponent = 0;
+ Desktop::getInstance().triggerFocusCallback();
+ JUCEApplication::sendUnhandledException (&e, __FILE__, __LINE__);
+ }
+ catch (...)
+ {
+ currentlyFocusedComponent = 0;
+ Desktop::getInstance().triggerFocusCallback();
+ JUCEApplication::sendUnhandledException (0, __FILE__, __LINE__);
+ }
+ #endif
}
-#if JUCE_CATCH_UNHANDLED_EXCEPTIONS
- catch (const std::exception& e)
- {
- currentlyFocusedComponent = 0;
- Desktop::getInstance().triggerFocusCallback();
- JUCEApplication::sendUnhandledException (&e, __FILE__, __LINE__);
- }
- catch (...)
- {
- currentlyFocusedComponent = 0;
- Desktop::getInstance().triggerFocusCallback();
- JUCEApplication::sendUnhandledException (0, __FILE__, __LINE__);
- }
-#endif
child->internalHierarchyChanged();
internalChildrenChanged();
@@ -41569,26 +41515,23 @@ void Component::paintComponentAndChildren (Graphics& g)
{
child.paintWithinParentContext (g);
}
- else
+ else if (g.reduceClipRegion (child.getBounds()))
{
- if (g.reduceClipRegion (child.getBounds()))
+ bool nothingClipped = true;
+
+ for (int j = i + 1; j < childComponentList_.size(); ++j)
{
- bool nothingClipped = true;
+ const Component& sibling = *childComponentList_.getUnchecked (j);
- for (int j = i + 1; j < childComponentList_.size(); ++j)
+ if (sibling.flags.opaqueFlag && sibling.isVisible() && sibling.affineTransform_ == 0)
{
- const Component& sibling = *childComponentList_.getUnchecked (j);
-
- if (sibling.flags.opaqueFlag && sibling.isVisible() && sibling.affineTransform_ == 0)
- {
- nothingClipped = false;
- g.excludeClipRegion (sibling.getBounds());
- }
+ nothingClipped = false;
+ g.excludeClipRegion (sibling.getBounds());
}
-
- if (nothingClipped || ! g.isClipEmpty())
- child.paintWithinParentContext (g);
}
+
+ if (nothingClipped || ! g.isClipEmpty())
+ child.paintWithinParentContext (g);
}
g.restoreState();
@@ -42069,11 +42012,8 @@ public:
deleteInstance();
}
- juce_UseDebuggingNewOperator
-
private:
- InternalDragRepeater (const InternalDragRepeater&);
- InternalDragRepeater& operator= (const InternalDragRepeater&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InternalDragRepeater);
};
juce_ImplementSingleton_SingleThreaded (InternalDragRepeater)
@@ -43406,13 +43346,10 @@ public:
RepeatTimer (Button& owner_) : owner (owner_) {}
void timerCallback() { owner.repeatTimerCallback(); }
- juce_UseDebuggingNewOperator
-
private:
Button& owner;
- RepeatTimer (const RepeatTimer&);
- RepeatTimer& operator= (const RepeatTimer&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RepeatTimer);
};
Button::Button (const String& name)
@@ -48691,8 +48628,6 @@ public:
return String::empty;
}
- juce_UseDebuggingNewOperator
-
ScopedPointer customComponent;
private:
@@ -48700,8 +48635,7 @@ private:
int row;
bool selected, isDragging, selectRowOnMouseUp;
- ListBoxRowComponent (const ListBoxRowComponent&);
- ListBoxRowComponent& operator= (const ListBoxRowComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ListBoxRowComponent);
};
class ListViewport : public Viewport
@@ -48884,16 +48818,13 @@ public:
return Viewport::keyPressed (key);
}
- juce_UseDebuggingNewOperator
-
private:
ListBox& owner;
OwnedArray rows;
int firstIndex, firstWholeIndex, lastWholeIndex;
bool hasUpdated;
- ListViewport (const ListViewport&);
- ListViewport& operator= (const ListViewport&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ListViewport);
};
ListBox::ListBox (const String& name, ListBoxModel* const model_)
@@ -49627,15 +49558,12 @@ public:
BubbleComponent::setPosition (owner);
}
- juce_UseDebuggingNewOperator
-
private:
Slider* owner;
Font font;
String text;
- SliderPopupDisplayComponent (const SliderPopupDisplayComponent&);
- SliderPopupDisplayComponent& operator= (const SliderPopupDisplayComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SliderPopupDisplayComponent);
};
Slider::Slider (const String& name)
@@ -52062,16 +51990,13 @@ public:
return columnComponents [owner.getHeader().getIndexOfColumnId (columnId, true)];
}
- juce_UseDebuggingNewOperator
-
private:
TableListBox& owner;
OwnedArray columnComponents;
int row;
bool isSelected, isDragging, selectRowOnMouseUp;
- TableListRowComp (const TableListRowComp&);
- TableListRowComp& operator= (const TableListRowComp&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TableListRowComp);
};
class TableListBoxHeader : public TableHeaderComponent
@@ -52104,15 +52029,12 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
TableListBox& owner;
enum { autoSizeColumnId = 0xf836743, autoSizeAllId = 0xf836744 };
- TableListBoxHeader (const TableListBoxHeader&);
- TableListBoxHeader& operator= (const TableListBoxHeader&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TableListBoxHeader);
};
TableListBox::TableListBox (const String& name, TableListBoxModel* const model_)
@@ -52564,8 +52486,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
Font font;
Colour colour;
@@ -52630,6 +52550,7 @@ private:
}
UniformTextSection& operator= (const UniformTextSection& other);
+ JUCE_LEAK_DETECTOR (UniformTextSection);
};
class TextEditor::Iterator
@@ -53012,8 +52933,6 @@ public:
return false;
}
- juce_UseDebuggingNewOperator
-
int indexInText;
float lineY, lineHeight, maxDescent;
float atomX, atomRight;
@@ -53047,6 +52966,8 @@ private:
{
return (x - 0.0001f) >= wordWrapWidth;
}
+
+ JUCE_LEAK_DETECTOR (Iterator);
};
class TextEditor::InsertAction : public UndoableAction
@@ -55030,14 +54951,11 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
const float fixedSize;
const bool drawBar;
- ToolbarSpacerComp (const ToolbarSpacerComp&);
- ToolbarSpacerComp& operator= (const ToolbarSpacerComp&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ToolbarSpacerComp);
};
class Toolbar::MissingItemsComponent : public PopupMenuCustomComponent
@@ -55123,15 +55041,12 @@ public:
idealHeight = getHeight();
}
- juce_UseDebuggingNewOperator
-
private:
Component::SafePointer owner;
const int height;
Array oldIndexes;
- MissingItemsComponent (const MissingItemsComponent&);
- MissingItemsComponent& operator= (const MissingItemsComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MissingItemsComponent);
};
Toolbar::Toolbar()
@@ -55821,13 +55736,11 @@ public:
setBounds (0, 0, getParentWidth(), getParentHeight());
}
- juce_UseDebuggingNewOperator
-
private:
+
bool isDragging;
- ItemDragAndDropOverlayComponent (const ItemDragAndDropOverlayComponent&);
- ItemDragAndDropOverlayComponent& operator= (const ItemDragAndDropOverlayComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ItemDragAndDropOverlayComponent);
};
ToolbarItemComponent::ToolbarItemComponent (const int itemId_,
@@ -56337,9 +56250,8 @@ public:
return owner.getTooltip();
}
- juce_UseDebuggingNewOperator
-
private:
+
TreeView& owner;
struct RowItem
@@ -56434,8 +56346,7 @@ private:
return false;
}
- TreeViewContentComponent (const TreeViewContentComponent&);
- TreeViewContentComponent& operator= (const TreeViewContentComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TreeViewContentComponent);
};
class TreeView::TreeViewport : public Viewport
@@ -56465,13 +56376,11 @@ public:
updateComponents (hasScrolledSideways);
}
- juce_UseDebuggingNewOperator
-
private:
+
int lastX;
- TreeViewport (const TreeViewport&);
- TreeViewport& operator= (const TreeViewport&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TreeViewport);
};
TreeView::TreeView (const String& componentName)
@@ -59077,9 +58986,8 @@ public:
repaint();
}
- juce_UseDebuggingNewOperator
-
private:
+
FileListComponent& owner;
TimeSliceThread& thread;
bool highlighted;
@@ -59117,6 +59025,8 @@ private:
}
}
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FileListItemComponent);
};
int FileListComponent::getNumRows()
@@ -59784,8 +59694,6 @@ public:
const File file;
- juce_UseDebuggingNewOperator
-
private:
FileTreeComponent& owner;
DirectoryContentsList* parentContentsList;
@@ -59819,6 +59727,8 @@ private:
}
}
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FileListTreeItem);
};
FileTreeComponent::FileTreeComponent (DirectoryContentsList& listToShow)
@@ -60302,15 +60212,12 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
KeyMappingEditorComponent& owner;
const CommandID commandID;
const int keyNum;
- ChangeKeyButton (const ChangeKeyButton&);
- ChangeKeyButton& operator= (const ChangeKeyButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChangeKeyButton);
};
class KeyMappingEditorComponent::ItemComponent : public Component
@@ -60365,8 +60272,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
KeyMappingEditorComponent& owner;
OwnedArray keyChangeButtons;
@@ -60374,8 +60279,7 @@ private:
enum { maxNumAssignments = 3 };
- ItemComponent (const ItemComponent&);
- ItemComponent& operator= (const ItemComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ItemComponent);
};
class KeyMappingEditorComponent::MappingItem : public TreeViewItem
@@ -60395,14 +60299,11 @@ public:
return new ItemComponent (owner, commandID);
}
- juce_UseDebuggingNewOperator
-
private:
KeyMappingEditorComponent& owner;
const CommandID commandID;
- MappingItem (const MappingItem&);
- MappingItem& operator= (const MappingItem&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MappingItem);
};
class KeyMappingEditorComponent::CategoryItem : public TreeViewItem
@@ -60448,14 +60349,11 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
KeyMappingEditorComponent& owner;
String categoryName;
- CategoryItem (const CategoryItem&);
- CategoryItem& operator= (const CategoryItem&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CategoryItem);
};
class KeyMappingEditorComponent::TopLevelItem : public TreeViewItem,
@@ -61425,13 +61323,10 @@ public:
0, 0, image.getWidth(), image.getHeight());
}
- juce_UseDebuggingNewOperator
-
private:
Image image;
- ProxyComponent (const ProxyComponent&);
- ProxyComponent& operator= (const ProxyComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProxyComponent);
};
Component::SafePointer component;
@@ -62824,8 +62719,6 @@ BEGIN_JUCE_NAMESPACE
class ScrollBar::ScrollbarButton : public Button
{
public:
- int direction;
-
ScrollbarButton (const int direction_, ScrollBar& owner_)
: Button (String::empty),
direction (direction_),
@@ -62834,10 +62727,6 @@ public:
setWantsKeyboardFocus (false);
}
- ~ScrollbarButton()
- {
- }
-
void paintButton (Graphics& g, bool over, bool down)
{
getLookAndFeel()
@@ -62853,13 +62742,12 @@ public:
owner.moveScrollbarInSteps ((direction == 1 || direction == 2) ? 1 : -1);
}
- juce_UseDebuggingNewOperator
+ int direction;
private:
ScrollBar& owner;
- ScrollbarButton (const ScrollbarButton&);
- ScrollbarButton& operator= (const ScrollbarButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ScrollbarButton);
};
ScrollBar::ScrollBar (const bool vertical_,
@@ -64237,13 +64125,10 @@ public:
return owner.createTabButton (tabName, tabIndex);
}
- juce_UseDebuggingNewOperator
-
private:
TabbedComponent& owner;
- TabCompButtonBar (const TabCompButtonBar&);
- TabCompButtonBar& operator= (const TabCompButtonBar&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TabCompButtonBar);
};
TabbedComponent::TabbedComponent (const TabbedButtonBar::Orientation orientation)
@@ -66733,14 +66618,11 @@ public:
g.fillPath (p, t);
}
- juce_UseDebuggingNewOperator
-
private:
Colour colour;
Path normalShape, toggledShape;
- GlassWindowButton (const GlassWindowButton&);
- GlassWindowButton& operator= (const GlassWindowButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlassWindowButton);
};
Button* LookAndFeel::createDocumentWindowButton (int buttonType)
@@ -68934,20 +68816,8 @@ public:
subMenu = new PopupMenu (*(other.subMenu));
}
- ~Item()
- {
- customComp = 0;
- }
-
- bool canBeTriggered() const throw()
- {
- return active && ! (isSeparator || (subMenu != 0));
- }
-
- bool hasActiveSubMenu() const throw()
- {
- return active && (subMenu != 0);
- }
+ bool canBeTriggered() const throw() { return active && ! (isSeparator || (subMenu != 0)); }
+ bool hasActiveSubMenu() const throw() { return active && (subMenu != 0); }
const int itemId;
String text;
@@ -68958,10 +68828,10 @@ public:
ScopedPointer subMenu;
ApplicationCommandManager* const commandManager;
- juce_UseDebuggingNewOperator
-
private:
Item& operator= (const Item&);
+
+ JUCE_LEAK_DETECTOR (Item);
};
class PopupMenu::ItemComponent : public Component
@@ -69058,13 +68928,10 @@ public:
PopupMenu::Item itemInfo;
- juce_UseDebuggingNewOperator
-
private:
bool isHighlighted;
- ItemComponent (const ItemComponent&);
- ItemComponent& operator= (const ItemComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ItemComponent);
};
namespace PopupMenuSettings
@@ -69503,8 +69370,6 @@ public:
return b;
}
- juce_UseDebuggingNewOperator
-
private:
Window* owner;
OwnedArray items;
@@ -70007,8 +69872,7 @@ private:
owner->disableTimerUntilMouseMoves();
}
- Window (const Window&);
- Window& operator= (const Window&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Window);
};
PopupMenu::PopupMenu()
@@ -70155,13 +70019,10 @@ public:
getChildComponent(0)->setBounds (getLocalBounds());
}
- juce_UseDebuggingNewOperator
-
private:
const int width, height;
- NormalComponentWrapper (const NormalComponentWrapper&);
- NormalComponentWrapper& operator= (const NormalComponentWrapper&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NormalComponentWrapper);
};
void PopupMenu::addCustomItem (const int itemResultId,
@@ -70200,10 +70061,6 @@ public:
setName (name);
}
- ~HeaderItemComponent()
- {
- }
-
void paint (Graphics& g)
{
Font f (getLookAndFeel().getPopupMenuFont());
@@ -70224,7 +70081,8 @@ public:
idealWidth += idealWidth / 4;
}
- juce_UseDebuggingNewOperator
+private:
+ JUCE_LEAK_DETECTOR (HeaderItemComponent);
};
void PopupMenu::addSectionHeader (const String& title)
@@ -70511,7 +70369,7 @@ ComponentDragger::~ComponentDragger()
{
}
-void ComponentDragger::startDraggingComponent (Component* const componentToDrag,
+void ComponentDragger::startDraggingComponent (Component* const componentToDrag, const MouseEvent& e,
ComponentBoundsConstrainer* const constrainer_)
{
jassert (componentToDrag != 0);
@@ -70519,7 +70377,7 @@ void ComponentDragger::startDraggingComponent (Component* const componentToDrag,
if (componentToDrag != 0)
{
constrainer = constrainer_;
- originalPos = componentToDrag->localPointToGlobal (Point());
+ mouseDownWithinTarget = e.getEventRelativeTo (componentToDrag).getMouseDownPosition();
}
}
@@ -70530,13 +70388,8 @@ void ComponentDragger::dragComponent (Component* const componentToDrag, const Mo
if (componentToDrag != 0)
{
- Rectangle bounds (componentToDrag->getBounds().withPosition (originalPos));
-
- const Component* const parentComp = componentToDrag->getParentComponent();
- if (parentComp != 0)
- bounds.setPosition (parentComp->getLocalPoint (0, originalPos));
-
- bounds.setPosition (bounds.getPosition() + e.getOffsetFromDragStart());
+ Rectangle bounds (componentToDrag->getBounds());
+ bounds += e.getEventRelativeTo (componentToDrag).getPosition() - mouseDownWithinTarget;
if (constrainer != 0)
constrainer->setBoundsForComponent (componentToDrag, bounds, false, false, false, false);
@@ -70989,6 +70842,11 @@ public:
{
}
+ ~SharedCursorHandle()
+ {
+ deleteMouseCursor (handle, isStandard);
+ }
+
static SharedCursorHandle* createStandard (const MouseCursor::StandardCursorType type)
{
const ScopedLock sl (getLock());
@@ -71028,9 +70886,8 @@ public:
void* getHandle() const throw() { return handle; }
- juce_UseDebuggingNewOperator
-
private:
+
void* const handle;
Atomic refCount;
const MouseCursor::StandardCursorType standardType;
@@ -71048,12 +70905,7 @@ private:
return cursors;
}
- ~SharedCursorHandle()
- {
- deleteMouseCursor (handle, isStandard);
- }
-
- SharedCursorHandle& operator= (const SharedCursorHandle&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SharedCursorHandle);
};
MouseCursor::MouseCursor()
@@ -72058,14 +71910,12 @@ public:
sendChangeMessage (true);
}
- juce_UseDebuggingNewOperator
-
protected:
+
Value sourceValue;
Array mappings;
- RemapperValueSource (const RemapperValueSource&);
- const RemapperValueSource& operator= (const RemapperValueSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RemapperValueSource);
};
ChoicePropertyComponent::ChoicePropertyComponent (const String& name)
@@ -72876,9 +72726,8 @@ public:
preferredHeight));
}
- juce_UseDebuggingNewOperator
-
private:
+
AudioDeviceManager& deviceManager;
const String noItemsMessage;
StringArray items;
@@ -72898,8 +72747,7 @@ private:
return getRowHeight() + 5;
}
- MidiInputSelectorComponentListBox (const MidiInputSelectorComponentListBox&);
- MidiInputSelectorComponentListBox& operator= (const MidiInputSelectorComponentListBox&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInputSelectorComponentListBox);
};
class AudioDeviceSettingsPanel : public Component,
@@ -73494,9 +73342,8 @@ public:
+ getOutlineThickness() * 2;
}
- juce_UseDebuggingNewOperator
-
private:
+
const AudioIODeviceType::DeviceSetupDetails setup;
const BoxType type;
const String noItemsMessage;
@@ -73587,8 +73434,7 @@ public:
return getRowHeight() + 5;
}
- ChannelSelectorListBox (const ChannelSelectorListBox&);
- ChannelSelectorListBox& operator= (const ChannelSelectorListBox&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelSelectorListBox);
};
private:
@@ -75056,13 +74902,10 @@ public:
{
}
- juce_UseDebuggingNewOperator
-
private:
MagnifierComponent* const magnifierComp;
- MagnifyingPeer (const MagnifyingPeer&);
- MagnifyingPeer& operator= (const MagnifyingPeer&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MagnifyingPeer);
};
class PeerHolderComp : public Component
@@ -76206,8 +76049,6 @@ public:
{
}
- ~OpenGLComponentWatcher() {}
-
void componentMovedOrResized (bool /*wasMoved*/, bool /*wasResized*/)
{
owner->updateContextPosition();
@@ -76235,11 +76076,11 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
OpenGLComponent* const owner;
bool wasShowing;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OpenGLComponentWatcher);
};
OpenGLComponent::OpenGLComponent (const OpenGLType type_)
@@ -77045,9 +76886,9 @@ bool AlertWindow::containsAnyExtraComponents() const
return allComps.size() > 0;
}
-void AlertWindow::mouseDown (const MouseEvent&)
+void AlertWindow::mouseDown (const MouseEvent& e)
{
- dragger.startDraggingComponent (this, &constrainer);
+ dragger.startDraggingComponent (this, e, &constrainer);
}
void AlertWindow::mouseDrag (const MouseEvent& e)
@@ -78015,13 +77856,10 @@ public:
owner.closeButtonPressed();
}
- juce_UseDebuggingNewOperator
-
private:
DocumentWindow& owner;
- ButtonListenerProxy (const ButtonListenerProxy&);
- ButtonListenerProxy& operator= (const ButtonListenerProxy&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ButtonListenerProxy);
};
DocumentWindow::DocumentWindow (const String& title,
@@ -78841,10 +78679,10 @@ bool ResizableWindow::restoreWindowStateFromString (const String& s)
return true;
}
-void ResizableWindow::mouseDown (const MouseEvent&)
+void ResizableWindow::mouseDown (const MouseEvent& e)
{
if (! isFullScreen())
- dragger.startDraggingComponent (this, constrainer);
+ dragger.startDraggingComponent (this, e, constrainer);
}
void ResizableWindow::mouseDrag (const MouseEvent& e)
@@ -85072,16 +84910,20 @@ public:
{
if (clip != 0)
{
+ cloneClipIfMultiplyReferenced();
+
if (isOnlyTranslated)
{
- cloneClipIfMultiplyReferenced();
clip = clip->excludeClipRectangle (r.translated (xOffset, yOffset));
}
else
{
- RectangleList all (getClipBounds());
- all.subtract (r);
- return clipToRectangleList (all);
+ Path p;
+ p.addRectangle (r.toFloat());
+ p.applyTransform (complexTransform);
+ p.addRectangle (clip->getClipBounds().toFloat());
+ p.setUsingNonZeroWinding (false);
+ clip = clip->clipToPath (p, AffineTransform::identity);
}
}
@@ -85141,7 +84983,7 @@ public:
if (isOnlyTranslated)
return clip->getClipBounds().translated (-xOffset, -yOffset);
else
- return clip->getClipBounds().toFloat().transformed (getTransform().inverted()).getSmallestIntegerContainer();
+ return clip->getClipBounds().toFloat().transformed (complexTransform.inverted()).getSmallestIntegerContainer();
}
return Rectangle();
@@ -85162,7 +85004,8 @@ public:
}
else
{
- s->complexTransform = s->complexTransform.followedBy (AffineTransform::translation ((float) -clip.getX(), (float) -clip.getY()));
+ s->complexTransform = s->complexTransform.followedBy (AffineTransform::translation ((float) -clip.getX(),
+ (float) -clip.getY()));
}
s->cloneClipIfMultiplyReferenced();
@@ -85588,13 +85431,10 @@ public:
int glyph, lastAccessCount;
Font font;
- juce_UseDebuggingNewOperator
-
private:
ScopedPointer edgeTable;
- CachedGlyph (const CachedGlyph&);
- CachedGlyph& operator= (const CachedGlyph&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CachedGlyph);
};
class LowLevelGraphicsSoftwareRenderer::GlyphCache : private DeletedAtShutdown
@@ -85657,15 +85497,12 @@ public:
oldest->draw (state, x, y);
}
- juce_UseDebuggingNewOperator
-
private:
friend class OwnedArray ;
OwnedArray glyphs;
int accessCounter, hits, misses;
- GlyphCache (const GlyphCache&);
- GlyphCache& operator= (const GlyphCache&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlyphCache);
};
juce_ImplementSingleton_SingleThreaded (LowLevelGraphicsSoftwareRenderer::GlyphCache);
@@ -85839,7 +85676,9 @@ void Drawable::nonConstDraw (Graphics& g, float opacity, const AffineTransform&
.followedBy (getTransform())
.followedBy (transform));
- paintEntireComponent (g, false);
+ if (! g.isClipEmpty())
+ paintEntireComponent (g, false);
+
setAlpha (oldOpacity);
g.restoreState();
}
@@ -86351,9 +86190,9 @@ DrawableComposite::DrawableComposite()
}
DrawableComposite::DrawableComposite (const DrawableComposite& other)
+ : bounds (other.bounds),
+ updateBoundsReentrant (false)
{
- bounds = other.bounds;
-
for (int i = 0; i < other.getNumDrawables(); ++i)
insertDrawable (other.getDrawable(i)->createCopy());
@@ -86499,8 +86338,10 @@ void DrawableComposite::refreshTransformFromBounds()
content.getRight(), content.getY(), resolved[1].getX(), resolved[1].getY(),
content.getX(), content.getBottom(), resolved[2].getX(), resolved[2].getY()));
- if (! t.isSingularity())
- setTransform (t);
+ if (t.isSingularity())
+ t = AffineTransform::identity;
+
+ setTransform (t);
}
void DrawableComposite::parentHierarchyChanged()
@@ -89863,8 +89704,6 @@ public:
return face->typeFace;
}
- juce_UseDebuggingNewOperator
-
private:
struct CachedFace
{
@@ -89882,8 +89721,7 @@ private:
int counter;
OwnedArray faces;
- TypefaceCache (const TypefaceCache&);
- TypefaceCache& operator= (const TypefaceCache&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TypefaceCache);
};
juce_ImplementSingleton_SingleThreaded (TypefaceCache)
@@ -90665,12 +90503,6 @@ BEGIN_JUCE_NAMESPACE
class TextLayout::Token
{
public:
- String text;
- Font font;
- int x, y, w, h;
- int line, lineHeight;
- bool isWhitespace, isNewLine;
-
Token (const String& t,
const Font& f,
const bool isWhitespace_)
@@ -90699,10 +90531,6 @@ public:
{
}
- ~Token()
- {
- }
-
void draw (Graphics& g,
const int xOffset,
const int yOffset)
@@ -90717,7 +90545,14 @@ public:
}
}
- juce_UseDebuggingNewOperator
+ String text;
+ Font font;
+ int x, y, w, h;
+ int line, lineHeight;
+ bool isWhitespace, isNewLine;
+
+private:
+ JUCE_LEAK_DETECTOR (Token);
};
TextLayout::TextLayout()
@@ -91036,10 +90871,6 @@ public:
{
}
- ~GlyphInfo() throw()
- {
- }
-
struct KerningPair
{
juce_wchar character2;
@@ -91072,11 +90903,8 @@ public:
float width;
Array kerningPairs;
- juce_UseDebuggingNewOperator
-
private:
- GlyphInfo (const GlyphInfo&);
- GlyphInfo& operator= (const GlyphInfo&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GlyphInfo);
};
CustomTypeface::CustomTypeface()
@@ -128856,16 +128684,13 @@ public:
{
}
- juce_UseDebuggingNewOperator
-
private:
FlacNamespace::FLAC__StreamDecoder* decoder;
AudioSampleBuffer reservoir;
int reservoirStart, samplesInReservoir;
bool ok, scanningForLength;
- FlacReader (const FlacReader&);
- FlacReader& operator= (const FlacReader&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FlacReader);
};
class FlacWriter : public AudioFormatWriter
@@ -129025,15 +128850,12 @@ public:
static_cast (client_data)->writeMetaData (metadata);
}
- juce_UseDebuggingNewOperator
-
bool ok;
private:
FlacNamespace::FLAC__StreamEncoder* encoder;
- FlacWriter (const FlacWriter&);
- FlacWriter& operator= (const FlacWriter&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FlacWriter);
};
FlacAudioFormat::FlacAudioFormat()
@@ -187892,7 +187714,8 @@ public:
return (long) static_cast (datasource)->getPosition();
}
- juce_UseDebuggingNewOperator
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OggReader);
};
class OggWriter : public AudioFormatWriter
@@ -188037,7 +187860,8 @@ public:
return true;
}
- juce_UseDebuggingNewOperator
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OggWriter);
};
OggVorbisAudioFormat::OggVorbisAudioFormat()
@@ -237871,9 +237695,9 @@ void SystemStats::initialiseStats()
(void) res;
jassert (res == TIMERR_NOERROR);
-#if JUCE_DEBUG && JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS
+ #if JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS
_CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
-#endif
+ #endif
}
SystemStats::OperatingSystemType SystemStats::getOperatingSystemType()
@@ -238354,9 +238178,9 @@ void Process::lowerPrivilege()
void Process::terminate()
{
-#if JUCE_DEBUG && JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS
+ #if JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS
_CrtDumpMemoryLeaks();
-#endif
+ #endif
// bullet in the head in case there's a problem shutting down..
ExitProcess (0);
@@ -239034,14 +238858,11 @@ public:
return true;
}
- juce_UseDebuggingNewOperator
-
private:
const String directoryWithWildCard;
HANDLE handle;
- Pimpl (const Pimpl&);
- Pimpl& operator= (const Pimpl&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl);
};
DirectoryIterator::NativeIterator::NativeIterator (const File& directory, const String& wildCard)
@@ -239360,15 +239181,12 @@ public:
notify();
}
- juce_UseDebuggingNewOperator
-
private:
URL_COMPONENTS& uc;
HINTERNET& connection;
const bool isFtp;
- InternetConnectThread (const InternetConnectThread&);
- InternetConnectThread& operator= (const InternetConnectThread&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InternetConnectThread);
};
#endif
@@ -240586,7 +240404,8 @@ public:
return true;
}
- juce_UseDebuggingNewOperator
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsTypeface);
};
const Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font)
@@ -241285,8 +241104,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
//xxx most of these members should probably be private...
Direct2DLowLevelGraphicsContext& owner;
@@ -241330,12 +241147,9 @@ public:
ComSmartPtr gradientStops;
private:
- SavedState (const SavedState&);
- SavedState& operator= (const SavedState& other);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SavedState);
};
- juce_UseDebuggingNewOperator
-
private:
HWND hwnd;
ComSmartPtr renderingTarget;
@@ -241474,6 +241288,8 @@ private:
matrix._32 = transform.mat12;
return matrix;
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Direct2DLowLevelGraphicsContext);
};
#endif
@@ -241788,11 +241604,8 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
- WindowsBitmapImage (const WindowsBitmapImage&);
- WindowsBitmapImage& operator= (const WindowsBitmapImage&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsBitmapImage);
};
namespace IconConverters
@@ -242460,8 +242273,6 @@ public:
return eventTimeOffset + thisMessageTime;
}
- juce_UseDebuggingNewOperator
-
bool dontRepaint;
static ModifierKeys currentModifiers;
@@ -243762,8 +243573,7 @@ private:
return false;
}
- Win32ComponentPeer (const Win32ComponentPeer&);
- Win32ComponentPeer& operator= (const Win32ComponentPeer&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Win32ComponentPeer);
};
ModifierKeys Win32ComponentPeer::currentModifiers;
@@ -244502,11 +244312,8 @@ namespace FileChooserHelpers
getChildComponent(0)->setBounds (getLocalBounds());
}
- juce_UseDebuggingNewOperator
-
private:
- CustomComponentHolder (const CustomComponentHolder&);
- CustomComponentHolder& operator= (const CustomComponentHolder&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomComponentHolder);
};
}
@@ -244745,8 +244552,6 @@ namespace ActiveXHelpers
HRESULT __stdcall SetClass (REFCLSID) { return S_OK; }
HRESULT __stdcall SetStateBits (DWORD, DWORD) { return E_NOTIMPL; }
HRESULT __stdcall Stat (STATSTG*, DWORD) { return E_NOTIMPL; }
-
- juce_UseDebuggingNewOperator
};
class JuceOleInPlaceFrame : public ComBaseClassHelper
@@ -244769,8 +244574,6 @@ namespace ActiveXHelpers
HRESULT __stdcall SetStatusText (LPCOLESTR) { return S_OK; }
HRESULT __stdcall EnableModeless (BOOL) { return S_OK; }
HRESULT __stdcall TranslateAccelerator(LPMSG, WORD) { return E_NOTIMPL; }
-
- juce_UseDebuggingNewOperator
};
class JuceIOleInPlaceSite : public ComBaseClassHelper
@@ -244815,8 +244618,6 @@ namespace ActiveXHelpers
HRESULT __stdcall DiscardUndoState() { return E_NOTIMPL; }
HRESULT __stdcall DeactivateAndUndo() { return E_NOTIMPL; }
HRESULT __stdcall OnPosRectChange (LPCRECT) { return S_OK; }
-
- juce_UseDebuggingNewOperator
};
class JuceIOleClientSite : public ComBaseClassHelper
@@ -244851,8 +244652,6 @@ namespace ActiveXHelpers
HRESULT __stdcall ShowObject() { return S_OK; }
HRESULT __stdcall OnShowWindow (BOOL) { return E_NOTIMPL; }
HRESULT __stdcall RequestNewObjectLayout() { return E_NOTIMPL; }
-
- juce_UseDebuggingNewOperator
};
static Array activeXComps;
@@ -245705,8 +245504,6 @@ public:
IWebBrowser2* browser;
- juce_UseDebuggingNewOperator
-
private:
IConnectionPoint* connectionPoint;
DWORD adviseCookie;
@@ -245763,14 +245560,13 @@ private:
owner->visibilityChanged();
}
- juce_UseDebuggingNewOperator
-
private:
WebBrowserComponent* const owner;
- EventHandler (const EventHandler&);
- EventHandler& operator= (const EventHandler&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EventHandler);
};
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebBrowserComponentInternal);
};
WebBrowserComponent::WebBrowserComponent (const bool unloadPageWhenBrowserIsHidden_)
@@ -246255,8 +246051,6 @@ public:
return nativeWindow != 0 ? nativeWindow->getNativeHandle() : 0;
}
- juce_UseDebuggingNewOperator
-
HGLRC renderContext;
private:
@@ -246366,8 +246160,7 @@ private:
return false;
}
- WindowedGLContext (const WindowedGLContext&);
- WindowedGLContext& operator= (const WindowedGLContext&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowedGLContext);
};
OpenGLContext* OpenGLComponent::createContext()
@@ -247891,9 +247684,6 @@ static bool initialisedOk = false;
class DeinitialiseTimer : private Timer,
private DeletedAtShutdown
{
- DeinitialiseTimer (const DeinitialiseTimer&);
- DeinitialiseTimer& operator= (const DeinitialiseTimer&);
-
public:
DeinitialiseTimer()
{
@@ -247911,7 +247701,8 @@ public:
delete this;
}
- juce_UseDebuggingNewOperator
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DeinitialiseTimer);
};
static void incUserCount()
@@ -248856,8 +248647,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
HMIDIIN deviceHandle;
private:
@@ -248947,8 +248736,7 @@ private:
return timeStamp * 0.001;
}
- MidiInCollector (const MidiInCollector&);
- MidiInCollector& operator= (const MidiInCollector&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInCollector);
};
Array MidiInCollector::activeMidiCollectors;
@@ -249052,7 +248840,8 @@ struct MidiOutHandle
static Array activeHandles;
- juce_UseDebuggingNewOperator
+private:
+ JUCE_LEAK_DETECTOR (MidiOutHandle);
};
Array MidiOutHandle::activeHandles;
@@ -249972,8 +249761,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
IASIO* volatile asioObject;
@@ -250875,6 +250662,8 @@ private:
break;
}
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ASIOAudioIODevice);
};
class ASIOAudioIODeviceType : public AudioIODeviceType
@@ -250986,8 +250775,6 @@ public:
return 0;
}
- juce_UseDebuggingNewOperator
-
private:
StringArray deviceNames;
OwnedArray classIds;
@@ -251083,8 +250870,7 @@ private:
}
}
- ASIOAudioIODeviceType (const ASIOAudioIODeviceType&);
- ASIOAudioIODeviceType& operator= (const ASIOAudioIODeviceType&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ASIOAudioIODeviceType);
};
AudioIODeviceType* juce_createAudioIODeviceType_ASIO()
@@ -252192,8 +251978,6 @@ public:
return lastError;
}
- juce_UseDebuggingNewOperator
-
StringArray inChannels, outChannels;
int outputDeviceIndex, inputDeviceIndex;
@@ -252217,9 +252001,6 @@ private:
AudioIODeviceCallback* callback;
CriticalSection startStopLock;
- DSoundAudioIODevice (const DSoundAudioIODevice&);
- DSoundAudioIODevice& operator= (const DSoundAudioIODevice&);
-
const String openDevice (const BigInteger& inputChannels,
const BigInteger& outputChannels,
double sampleRate_,
@@ -252358,6 +252139,8 @@ public:
}
}
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DSoundAudioIODevice);
};
class DSoundAudioIODeviceType : public AudioIODeviceType
@@ -252434,8 +252217,6 @@ public:
return 0;
}
- juce_UseDebuggingNewOperator
-
StringArray outputDeviceNames;
OwnedArray outputGuids;
@@ -252515,8 +252296,7 @@ private:
->inputEnumProc (lpGUID, String (description));
}
- DSoundAudioIODeviceType (const DSoundAudioIODeviceType&);
- DSoundAudioIODeviceType& operator= (const DSoundAudioIODeviceType&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DSoundAudioIODeviceType);
};
const String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels,
@@ -253475,8 +253255,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
String outputDeviceId, inputDeviceId;
String lastError;
@@ -253535,8 +253313,7 @@ private:
&& (inputDeviceId.isEmpty() || (inputDevice != 0 && inputDevice->isOk()));
}
- WASAPIAudioIODevice (const WASAPIAudioIODevice&);
- WASAPIAudioIODevice& operator= (const WASAPIAudioIODevice&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WASAPIAudioIODevice);
};
class WASAPIAudioIODeviceType : public AudioIODeviceType
@@ -253675,8 +253452,6 @@ public:
return device.release();
}
- juce_UseDebuggingNewOperator
-
StringArray outputDeviceNames, outputDeviceIds;
StringArray inputDeviceNames, inputDeviceIds;
@@ -253703,8 +253478,7 @@ private:
return s;
}
- WASAPIAudioIODeviceType (const WASAPIAudioIODeviceType&);
- WASAPIAudioIODeviceType& operator= (const WASAPIAudioIODeviceType&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WASAPIAudioIODeviceType);
};
}
@@ -256095,8 +255869,6 @@ public:
int readPosition;
StringArray headerLines;
- juce_UseDebuggingNewOperator
-
private:
int socketHandle, levelsOfRedirection;
const int timeoutSeconds;
@@ -256233,6 +256005,8 @@ private:
return String::empty;
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JUCE_HTTPSocketStream);
};
void* juce_openInternetFile (const String& url,
@@ -258387,8 +258161,6 @@ public:
XPutImage (display, (::Drawable) window, gc, xImage, sx, sy, dx, dy, dw, dh);
}
- juce_UseDebuggingNewOperator
-
private:
XImage* xImage;
const int imageDepth;
@@ -258411,6 +258183,8 @@ private:
jassertfalse;
return 0;
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (XBitmapImage);
};
class LinuxComponentPeer : public ComponentPeer
@@ -259491,8 +259265,6 @@ public:
const Image& getTaskbarIcon() const throw() { return taskbarImage; }
- juce_UseDebuggingNewOperator
-
bool dontRepaint;
static ModifierKeys currentModifiers;
@@ -260395,6 +260167,8 @@ private:
{
lastMousePos = Point (0x100000, 0x100000);
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LinuxComponentPeer);
};
ModifierKeys LinuxComponentPeer::currentModifiers;
@@ -261031,8 +260805,6 @@ public:
{
}
- juce_UseDebuggingNewOperator
-
GLXContext renderContext;
private:
@@ -261040,8 +260812,7 @@ private:
OpenGLPixelFormat pixelFormat;
int swapInterval;
- WindowedGLContext (const WindowedGLContext&);
- WindowedGLContext& operator= (const WindowedGLContext&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowedGLContext);
};
OpenGLContext* OpenGLComponent::createContext()
@@ -261479,8 +261250,6 @@ public:
return true;
}
- juce_UseDebuggingNewOperator
-
snd_pcm_t* handle;
String error;
int bitDepth, numChannelsRunning, latency;
@@ -261540,6 +261309,8 @@ private:
DBG ("ALSA error: " + error + "\n");
return true;
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ALSADevice);
};
class ALSAThread : public Thread
@@ -261778,8 +261549,6 @@ public:
return 16;
}
- juce_UseDebuggingNewOperator
-
String error;
double sampleRate;
int bufferSize, outputLatency, inputLatency;
@@ -261834,6 +261603,8 @@ private:
for (i = 0; i < maxChansIn; ++i)
channelNamesIn.add ("channel " + String ((int) i + 1));
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ALSAThread);
};
class ALSAAudioIODevice : public AudioIODevice
@@ -262127,8 +261898,6 @@ public:
return 0;
}
- juce_UseDebuggingNewOperator
-
private:
StringArray inputNames, outputNames, inputIds, outputIds;
bool hasScanned;
@@ -262160,8 +261929,7 @@ private:
return s;
}*/
- ALSAAudioIODeviceType (const ALSAAudioIODeviceType&);
- ALSAAudioIODeviceType& operator= (const ALSAAudioIODeviceType&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ALSAAudioIODeviceType);
};
AudioIODeviceType* juce_createAudioIODeviceType_ALSA()
@@ -262725,14 +262493,11 @@ public:
return 0;
}
- juce_UseDebuggingNewOperator
-
private:
StringArray inputNames, outputNames, inputIds, outputIds;
bool hasScanned;
- JackAudioIODeviceType (const JackAudioIODeviceType&);
- JackAudioIODeviceType& operator= (const JackAudioIODeviceType&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JackAudioIODeviceType);
};
AudioIODeviceType* juce_createAudioIODeviceType_JACK()
@@ -262923,13 +262688,13 @@ public:
snd_seq_drain_output (seqHandle);
}
- juce_UseDebuggingNewOperator
-
private:
MidiOutput* const midiOutput;
snd_seq_t* const seqHandle;
snd_midi_event_t* midiParser;
int maxEventSize;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiOutputDevice);
};
const StringArray MidiOutput::getDevices()
@@ -263070,12 +262835,12 @@ public:
}
};
- juce_UseDebuggingNewOperator
-
private:
MidiInput* const midiInput;
snd_seq_t* const seqHandle;
MidiInputCallback* const callback;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInputThread);
};
MidiInput::MidiInput (const String& name_)
@@ -266413,8 +266178,6 @@ public:
#endif
}
- juce_UseDebuggingNewOperator
-
CGFontRef fontRef;
float fontHeightToCGSizeFactor;
CGAffineTransform renderingTransform;
@@ -266558,8 +266321,7 @@ private:
ScopedPointer charToGlyphMapper;
#endif
- MacTypeface (const MacTypeface&);
- MacTypeface& operator= (const MacTypeface&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MacTypeface);
};
const Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font)
@@ -267553,8 +267315,6 @@ public:
void repaint (const Rectangle& area);
void performAnyPendingRepaintsNow();
- juce_UseDebuggingNewOperator
-
UIWindow* window;
JuceUIView* view;
JuceUIViewController* controller;
@@ -267622,6 +267382,9 @@ public:
}
Array currentTouches;
+
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UIViewComponentPeer);
};
END_JUCE_NAMESPACE
@@ -269024,8 +268787,6 @@ public:
void* getNativeWindowHandle() const { return viewHolder->view; }
- juce_UseDebuggingNewOperator
-
NSOpenGLContext* renderContext;
ThreadSafeNSOpenGLView* view;
@@ -269033,8 +268794,7 @@ private:
OpenGLPixelFormat pixelFormat;
ScopedPointer viewHolder;
- WindowedGLContext (const WindowedGLContext&);
- WindowedGLContext& operator= (const WindowedGLContext&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowedGLContext);
};
OpenGLContext* OpenGLComponent::createContext()
@@ -269265,8 +269025,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
Component::SafePointer component;
OpenGLPixelFormat pixelFormat;
@@ -269278,8 +269036,7 @@ private:
int numFrames;
int lastWidth, lastHeight;
- GLESContext (const GLESContext&);
- GLESContext& operator= (const GLESContext&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GLESContext);
};
OpenGLContext* OpenGLComponent::createContext()
@@ -270251,10 +270008,6 @@ public:
{
}
- ~IPhoneAudioIODeviceType()
- {
- }
-
void scanForDevices()
{
}
@@ -270290,11 +270043,8 @@ public:
return 0;
}
- juce_UseDebuggingNewOperator
-
private:
- IPhoneAudioIODeviceType (const IPhoneAudioIODeviceType&);
- IPhoneAudioIODeviceType& operator= (const IPhoneAudioIODeviceType&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IPhoneAudioIODeviceType);
};
AudioIODeviceType* juce_createAudioIODeviceType_iPhoneAudio()
@@ -271170,8 +270920,6 @@ public:
#endif
}
- juce_UseDebuggingNewOperator
-
CGFontRef fontRef;
float fontHeightToCGSizeFactor;
CGAffineTransform renderingTransform;
@@ -271315,8 +271063,7 @@ private:
ScopedPointer charToGlyphMapper;
#endif
- MacTypeface (const MacTypeface&);
- MacTypeface& operator= (const MacTypeface&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MacTypeface);
};
const Typeface::Ptr Typeface::createSystemTypefaceFor (const Font& font)
@@ -272441,8 +272188,6 @@ public:
void repaint (const Rectangle& area);
void performAnyPendingRepaintsNow();
- juce_UseDebuggingNewOperator
-
NSWindow* window;
JuceNSView* view;
bool isSharedWindow, fullScreen, insideDrawRect, usingCoreGraphics, recursiveToFrontCall;
@@ -272450,6 +272195,9 @@ public:
static ModifierKeys currentModifiers;
static ComponentPeer* currentlyFocusedPeer;
static Array keysCurrentlyDown;
+
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NSViewComponentPeer);
};
END_JUCE_NAMESPACE
@@ -274143,11 +273891,8 @@ public:
return Rectangle (0, 0, (int) r.size.width, (int) r.size.height);
}
- juce_UseDebuggingNewOperator
-
private:
- NSViewComponentInternal (const NSViewComponentInternal&);
- NSViewComponentInternal& operator= (const NSViewComponentInternal&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NSViewComponentInternal);
};
NSViewComponent::NSViewComponent()
@@ -274665,8 +274410,6 @@ public:
void* getNativeWindowHandle() const { return viewHolder->view; }
- juce_UseDebuggingNewOperator
-
NSOpenGLContext* renderContext;
ThreadSafeNSOpenGLView* view;
@@ -274674,8 +274417,7 @@ private:
OpenGLPixelFormat pixelFormat;
ScopedPointer viewHolder;
- WindowedGLContext (const WindowedGLContext&);
- WindowedGLContext& operator= (const WindowedGLContext&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowedGLContext);
};
OpenGLContext* OpenGLComponent::createContext()
@@ -274906,8 +274648,6 @@ public:
}
}
- juce_UseDebuggingNewOperator
-
private:
Component::SafePointer component;
OpenGLPixelFormat pixelFormat;
@@ -274919,8 +274659,7 @@ private:
int numFrames;
int lastWidth, lastHeight;
- GLESContext (const GLESContext&);
- GLESContext& operator= (const GLESContext&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GLESContext);
};
OpenGLContext* OpenGLComponent::createContext()
@@ -278297,8 +278036,6 @@ public:
return result.release();
}
- juce_UseDebuggingNewOperator
-
int inputLatency, outputLatency;
BigInteger activeInputChans, activeOutputChans;
StringArray inChanNames, outChanNames;
@@ -278333,9 +278070,6 @@ private:
HeapBlock inputChannelInfo, outputChannelInfo;
HeapBlock tempInputBuffers, tempOutputBuffers;
- CoreAudioInternal (const CoreAudioInternal&);
- CoreAudioInternal& operator= (const CoreAudioInternal&);
-
static OSStatus audioIOProc (AudioDeviceID /*inDevice*/,
const AudioTimeStamp* /*inNow*/,
const AudioBufferList* inInputData,
@@ -278393,6 +278127,8 @@ private:
return 0;
}
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreAudioInternal);
};
class CoreAudioIODevice : public AudioIODevice
@@ -278613,8 +278349,6 @@ public:
int inputIndex, outputIndex;
- juce_UseDebuggingNewOperator
-
private:
ScopedPointer internal;
bool isOpen_, isStarted;
@@ -278639,8 +278373,7 @@ private:
return noErr;
}
- CoreAudioIODevice (const CoreAudioIODevice&);
- CoreAudioIODevice& operator= (const CoreAudioIODevice&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreAudioIODevice);
};
class CoreAudioIODeviceType : public AudioIODeviceType
@@ -278793,8 +278526,6 @@ public:
return 0;
}
- juce_UseDebuggingNewOperator
-
private:
StringArray inputDeviceNames, outputDeviceNames;
Array inputIds, outputIds;
@@ -278831,8 +278562,7 @@ private:
return total;
}
- CoreAudioIODeviceType (const CoreAudioIODeviceType&);
- CoreAudioIODeviceType& operator= (const CoreAudioIODeviceType&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreAudioIODeviceType);
};
AudioIODeviceType* juce_createAudioIODeviceType_CoreAudio()
diff --git a/juce_amalgamated.h b/juce_amalgamated.h
index 74670db392..67fe696312 100644
--- a/juce_amalgamated.h
+++ b/juce_amalgamated.h
@@ -467,10 +467,11 @@
#define JUCE_INCLUDE_JPEGLIB_CODE 1
#endif
-/** JUCE_CHECK_MEMORY_LEAKS: Enables a memory-leak check when an app terminates.
- (Currently, this only affects Windows builds in debug mode).
+/** JUCE_CHECK_MEMORY_LEAKS: Enables a memory-leak check for certain objects when
+ the app terminates. See the LeakedObjectDetector class and the JUCE_LEAK_DETECTOR
+ macro for more details about enabling leak checking for specific classes.
*/
-#ifndef JUCE_CHECK_MEMORY_LEAKS
+#if JUCE_DEBUG && ! defined (JUCE_CHECK_MEMORY_LEAKS)
#define JUCE_CHECK_MEMORY_LEAKS 1
#endif
@@ -638,6 +639,42 @@
*/
#define static_jassert(expression) JuceStaticAssert::dummy();
+/** This is a shorthand macro for declaring stubs for a class's copy constructor and
+ operator=.
+
+ For example, instead of
+ @code
+ class MyClass
+ {
+ etc..
+
+ private:
+ MyClass (const MyClass&);
+ MyClass& operator= (const MyClass&);
+ };@endcode
+
+ ..you can just write:
+
+ @code
+ class MyClass
+ {
+ etc..
+
+ private:
+ JUCE_DECLARE_NON_COPYABLE (MyClass);
+ };@endcode
+*/
+#define JUCE_DECLARE_NON_COPYABLE(className) \
+ className (const className&);\
+ className& operator= (const className&);
+
+/** This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and
+ JUCE_LEAK_DETECTOR macro for a class.
+*/
+#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className) \
+ JUCE_DECLARE_NON_COPYABLE(className)\
+ JUCE_LEAK_DETECTOR(className)
+
#if JUCE_CATCH_UNHANDLED_EXCEPTIONS
#define JUCE_TRY try
@@ -824,7 +861,7 @@ extern JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger();
preference to the standard calls.
*/
-#if JUCE_DEBUG && JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS
+#if JUCE_MSVC && JUCE_CHECK_MEMORY_LEAKS
#ifndef JUCE_DLL
// Win32 debug non-DLL versions..
@@ -881,18 +918,6 @@ extern JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger();
#define juce_free(location) JUCE_NAMESPACE::juce_DebugFree (location)
#endif
- #if ! defined (_AFXDLL)
- /** This macro can be added to classes to add extra debugging information to the memory
- allocated for them, so you can see the type of objects involved when there's a dump
- of leaked objects at program shutdown. (Only works on win32 at the moment).
- */
- #define juce_UseDebuggingNewOperator \
- static void* operator new (size_t sz) { void* const p = juce_malloc ((int) sz); return (p != 0) ? p : ::operator new (sz); } \
- static void* operator new (size_t, void* p) { return p; } \
- static void operator delete (void* p) { juce_free (p); } \
- static void operator delete (void*, void*) { }
- #endif
-
#elif defined (JUCE_DLL)
// Win32 DLL (release) versions..
@@ -924,12 +949,6 @@ extern JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger();
*/
#define juce_free(location) JUCE_NAMESPACE::juce_Free (location)
- #define juce_UseDebuggingNewOperator \
- static void* operator new (size_t sz) { void* const p = juce_malloc ((int) sz); return (p != 0) ? p : ::operator new (sz); } \
- static void* operator new (size_t, void* p) { return p; } \
- static void operator delete (void* p) { juce_free (p); } \
- static void operator delete (void*, void*) { }
-
#else
// Mac, Linux and Win32 (release) versions..
@@ -956,21 +975,14 @@ extern JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger();
#endif
-/** This macro can be added to classes to add extra debugging information to the memory
- allocated for them, so you can see the type of objects involved when there's a dump
- of leaked objects at program shutdown. (Only works on win32 at the moment).
-
- Note that if you create a class that inherits from a class that uses this macro,
- your class must also use the macro, otherwise you'll probably get compile errors
- because of ambiguous new operators.
-
- Most of the JUCE classes use it, so see these for examples of where it should go.
+/** (Deprecated) This was a win32-specific way of checking for object leaks - now please
+ use the JUCE_LEAK_DETECTOR instead.
*/
#ifndef juce_UseDebuggingNewOperator
#define juce_UseDebuggingNewOperator
#endif
-#if JUCE_MSVC
+#if JUCE_MSVC || DOXYGEN
/** This is a compiler-independent way of declaring a variable as being thread-local.
E.g.
@@ -997,6 +1009,9 @@ inline void zerostruct (Type& structure) throw() { memset (&structure, 0, size
/** A handy function that calls delete on a pointer if it's non-zero, and then sets
the pointer to null.
+
+ Never use this if there's any way you could use a ScopedPointer or other safer way of
+ managing the lieftimes of your objects!
*/
template
inline void deleteAndZero (Type& pointer) { delete pointer; pointer = 0; }
@@ -2620,8 +2635,6 @@ public:
Concatenator& operator= (const Concatenator&);
};
- juce_UseDebuggingNewOperator // (adds debugging info to find leaked objects)
-
private:
juce_wchar* text;
@@ -2783,32 +2796,10 @@ private:
#endif // __JUCE_LOGGER_JUCEHEADER__
/*** End of inlined file: juce_Logger.h ***/
-END_JUCE_NAMESPACE
-#endif // __JUCE_STANDARDHEADER_JUCEHEADER__
-/*** End of inlined file: juce_StandardHeader.h ***/
-
-
-BEGIN_JUCE_NAMESPACE
-
-#if JUCE_MSVC
- // this is set explicitly in case the app is using a different packing size.
- #pragma pack (push, 8)
- #pragma warning (push)
- #pragma warning (disable: 4786) // (old vc6 warning about long class names)
-#endif
-
-// this is where all the class header files get brought in..
-
-/*** Start of inlined file: juce_core_includes.h ***/
-#ifndef __JUCE_JUCE_CORE_INCLUDES_INCLUDEFILES__
-#define __JUCE_JUCE_CORE_INCLUDES_INCLUDEFILES__
-
-#ifndef __JUCE_ABSTRACTFIFO_JUCEHEADER__
-
-/*** Start of inlined file: juce_AbstractFifo.h ***/
-#ifndef __JUCE_ABSTRACTFIFO_JUCEHEADER__
-#define __JUCE_ABSTRACTFIFO_JUCEHEADER__
+/*** Start of inlined file: juce_LeakedObjectDetector.h ***/
+#ifndef __JUCE_LEAKEDOBJECTDETECTOR_JUCEHEADER__
+#define __JUCE_LEAKEDOBJECTDETECTOR_JUCEHEADER__
/*** Start of inlined file: juce_Atomic.h ***/
@@ -3148,6 +3139,143 @@ inline void Atomic::memoryBarrier() throw()
#endif // __JUCE_ATOMIC_JUCEHEADER__
/*** End of inlined file: juce_Atomic.h ***/
+/**
+ Embedding an instance of this class inside another class can be used as a low-overhead
+ way of detecting leaked instances.
+
+ This class keeps an internal static count of the number of instances that are
+ active, so that when the app is shutdown and the static destructors are called,
+ it can check whether there are any left-over instances that may have been leaked.
+
+ To use it, use the JUCE_LEAK_DETECTOR macro as a simple way to put one in your
+ class declaration. Have a look through the juce codebase for examples, it's used
+ in most of the classes.
+*/
+template
+class LeakedObjectDetector
+{
+public:
+
+ LeakedObjectDetector() throw() { ++(getCounter().numObjects); }
+ LeakedObjectDetector (const LeakedObjectDetector&) throw() { ++(getCounter().numObjects); }
+
+ ~LeakedObjectDetector()
+ {
+ if (--(getCounter().numObjects) < 0)
+ {
+ DBG ("*** Dangling pointer deletion! Class: " << String (typeid (OwnerClass).name()));
+
+ /** If you hit this, then you've managed to delete more instances of this class than you've
+ created.. That indicates that you're deleting some dangling pointers.
+
+ Note that although this assertion will have been triggered during a destructor, it might
+ not be this particular deletion that's at fault - the incorrect one may have happened
+ at an earlier point in the program, and simply not been detected until now.
+
+ Most errors like this are caused by using old-fashioned, non-RAII techniques for
+ your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,
+ ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
+ */
+ jassertfalse;
+ }
+ }
+
+private:
+
+ class LeakCounter
+ {
+ public:
+ LeakCounter() {}
+
+ ~LeakCounter()
+ {
+ if (numObjects.value > 0)
+ {
+ DBG ("*** Leaked objects detected: " << numObjects.value << " instance(s) of class " << String (typeid (OwnerClass).name()));
+
+ /** If you hit this, then you've leaked one or more objects of the type specified by
+ the 'OwnerClass' template parameter - the name should have been printed by the line above.
+
+ If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for
+ your object management. Tut, tut. Always, always use ScopedPointers, OwnedArrays,
+ ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!
+ */
+ jassertfalse;
+ }
+ }
+
+ Atomic numObjects;
+ };
+
+ static LeakCounter& getCounter() throw()
+ {
+ static LeakCounter counter;
+ return counter;
+ }
+};
+
+#if JUCE_DLL && ! DOXYGEN // This hack makes use of the leak detector macros to add dll-safe allocators to all the classes..
+ #define JUCE_LEAK_DETECTOR(OwnerClass) \
+ public:\
+ static void* operator new (size_t sz) { void* const p = juce_malloc ((int) sz); return (p != 0) ? p : ::operator new (sz); } \
+ static void* operator new (size_t, void* p) { return p; } \
+ static void operator delete (void* p) { juce_free (p); } \
+ static void operator delete (void*, void*) { }
+
+#elif JUCE_CHECK_MEMORY_LEAKS || DOXYGEN
+ /** This macro lets you embed a leak-detecting object inside a class.
+
+ To use it, simply declare a JUCE_LEAK_DETECTOR(YourClassName) inside a private section
+ of the class declaration. E.g.
+
+ @code
+ class MyClass
+ {
+ public:
+ MyClass();
+ void blahBlah();
+
+ private:
+ JUCE_LEAK_DETECTOR (MyClass);
+ };@endcode
+
+ @see JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR, LeakedObjectDetector
+ */
+ #define JUCE_LEAK_DETECTOR(OwnerClass) LeakedObjectDetector leakDetector ## __LINE__;
+#else
+ #define JUCE_LEAK_DETECTOR(OwnerClass)
+#endif
+
+#endif // __JUCE_LEAKEDOBJECTDETECTOR_JUCEHEADER__
+/*** End of inlined file: juce_LeakedObjectDetector.h ***/
+
+END_JUCE_NAMESPACE
+
+#endif // __JUCE_STANDARDHEADER_JUCEHEADER__
+/*** End of inlined file: juce_StandardHeader.h ***/
+
+
+BEGIN_JUCE_NAMESPACE
+
+#if JUCE_MSVC
+ // this is set explicitly in case the app is using a different packing size.
+ #pragma pack (push, 8)
+ #pragma warning (push)
+ #pragma warning (disable: 4786) // (old vc6 warning about long class names)
+#endif
+
+// this is where all the class header files get brought in..
+
+/*** Start of inlined file: juce_core_includes.h ***/
+#ifndef __JUCE_JUCE_CORE_INCLUDES_INCLUDEFILES__
+#define __JUCE_JUCE_CORE_INCLUDES_INCLUDEFILES__
+
+#ifndef __JUCE_ABSTRACTFIFO_JUCEHEADER__
+
+/*** Start of inlined file: juce_AbstractFifo.h ***/
+#ifndef __JUCE_ABSTRACTFIFO_JUCEHEADER__
+#define __JUCE_ABSTRACTFIFO_JUCEHEADER__
+
/**
Encapsulates the logic required to implement a lock-free FIFO.
@@ -3322,14 +3450,12 @@ public:
*/
void finishedRead (int numRead) throw();
- juce_UseDebuggingNewOperator
-
private:
+
int bufferSize;
Atomic validStart, validEnd;
- AbstractFifo (const AbstractFifo&);
- AbstractFifo& operator= (const AbstractFifo&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AbstractFifo);
};
#endif // __JUCE_ABSTRACTFIFO_JUCEHEADER__
@@ -3968,8 +4094,6 @@ public:
/** Provides the type of scoped unlocker to use with this type of critical section object. */
typedef ScopedUnlock ScopedUnlockType;
- juce_UseDebuggingNewOperator
-
private:
#if JUCE_WINDOWS
@@ -4963,9 +5087,8 @@ public:
/** Returns the type of scoped lock to use for locking this array */
typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;
- juce_UseDebuggingNewOperator
-
private:
+
ArrayAllocationBase data;
int numUsed;
};
@@ -5250,9 +5373,8 @@ public:
*/
void loadFromMemoryBlock (const MemoryBlock& data);
- juce_UseDebuggingNewOperator
-
private:
+
HeapBlock values;
int numValues, highestBit;
bool negative;
@@ -5262,6 +5384,8 @@ private:
static inline int bitToIndex (const int bit) throw() { return bit >> 5; }
static inline uint32 bitToMask (const int bit) throw() { return 1 << (bit & 31); }
+
+ JUCE_LEAK_DETECTOR (BigInteger);
};
/** Writes a BigInteger to an OutputStream as a UTF8 decimal string. */
@@ -5618,13 +5742,13 @@ public:
*/
bool fromBase64Encoding (const String& encodedString);
- juce_UseDebuggingNewOperator
-
private:
HeapBlock data;
size_t size;
static const char* const encodingTable;
+
+ JUCE_LEAK_DETECTOR (MemoryBlock);
};
#endif // __JUCE_MEMORYBLOCK_JUCEHEADER__
@@ -5870,11 +5994,12 @@ public:
*/
virtual void skipNextBytes (int64 numBytesToSkip);
- juce_UseDebuggingNewOperator
-
protected:
InputStream() throw() {}
+
+private:
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InputStream);
};
#endif // __JUCE_INPUTSTREAM_JUCEHEADER__
@@ -6049,7 +6174,9 @@ public:
*/
virtual int writeFromInputStream (InputStream& source, int64 maxNumBytesToWrite);
- juce_UseDebuggingNewOperator
+private:
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OutputStream);
};
/** Writes a number to a stream as 8-bit characters in the default system encoding. */
@@ -6171,8 +6298,6 @@ public:
/** If this variant is a method pointer, this invokes it on a target object. */
const var invoke (const var& targetObject, const var* arguments, int numArguments) const;
- juce_UseDebuggingNewOperator
-
/** Returns true if this var has the same value as the one supplied. */
bool equals (const var& other) const throw();
@@ -6293,9 +6418,8 @@ public:
*/
var* getVarPointer (const Identifier& name) const;
- juce_UseDebuggingNewOperator
-
private:
+
struct NamedValue
{
NamedValue() throw();
@@ -6640,10 +6764,11 @@ public:
/** Removes all properties and methods from the object. */
void clear();
- juce_UseDebuggingNewOperator
-
private:
+
NamedValueSet properties;
+
+ JUCE_LEAK_DETECTOR (DynamicObject);
};
#endif // __JUCE_DYNAMICOBJECT_JUCEHEADER__
@@ -7015,9 +7140,8 @@ public:
*/
const Expression getInput (int index) const;
- juce_UseDebuggingNewOperator
-
private:
+
class Helpers;
friend class Helpers;
@@ -7042,11 +7166,8 @@ private:
virtual const String getSymbolName() const;
virtual const String getFunctionName() const;
- juce_UseDebuggingNewOperator
-
private:
- Term (const Term& other);
- Term& operator= (const Term&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Term);
};
friend class ScopedPointer;
@@ -7825,15 +7946,12 @@ public:
/** Returns the type of scoped lock to use for locking this array */
typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;
- juce_UseDebuggingNewOperator
-
private:
+
ArrayAllocationBase data;
int numUsed;
- // disallow copy constructor and assignment
- OwnedArray (const OwnedArray&);
- OwnedArray& operator= (const OwnedArray&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OwnedArray);
};
#endif // __JUCE_OWNEDARRAY_JUCEHEADER__
@@ -8147,10 +8265,11 @@ public:
*/
void minimiseStorageOverheads();
- juce_UseDebuggingNewOperator
-
private:
+
Array strings;
+
+ JUCE_LEAK_DETECTOR (StringArray);
};
#endif // __JUCE_STRINGARRAY_JUCEHEADER__
@@ -8269,11 +8388,12 @@ public:
*/
void minimiseStorageOverheads();
- juce_UseDebuggingNewOperator
-
private:
+
StringArray keys, values;
bool ignoreCase;
+
+ JUCE_LEAK_DETECTOR (StringPairArray);
};
#endif // __JUCE_STRINGPAIRARRAY_JUCEHEADER__
@@ -8450,9 +8570,8 @@ public:
/** Subtracts a number of seconds from this time. */
const RelativeTime& operator-= (double secondsToSubtract) throw();
- juce_UseDebuggingNewOperator
-
private:
+
double seconds;
};
@@ -9675,8 +9794,6 @@ public:
/** Adds a separator character to the end of a path if it doesn't already have one. */
static const String addTrailingSeparator (const String& path);
- juce_UseDebuggingNewOperator
-
private:
String fullPath;
@@ -9695,6 +9812,7 @@ private:
static const String parseAbsolutePath (const String& path);
+ JUCE_LEAK_DETECTOR (File);
};
#endif // __JUCE_FILE_JUCEHEADER__
@@ -10342,8 +10460,6 @@ public:
*/
static XmlElement* createTextElement (const String& text);
- juce_UseDebuggingNewOperator
-
private:
friend class XmlDocument;
@@ -10372,6 +10488,8 @@ private:
void writeElementAsText (OutputStream& out, int indentationLevel, int lineWrapLength) const;
void getChildElementsAsArray (XmlElement**) const throw();
void reorderChildElements (XmlElement**, int) throw();
+
+ JUCE_LEAK_DETECTOR (XmlElement);
};
#endif // __JUCE_XMLELEMENT_JUCEHEADER__
@@ -10541,12 +10659,9 @@ public:
*/
PropertySet* getFallbackPropertySet() const throw() { return fallbackProperties; }
- juce_UseDebuggingNewOperator
-
protected:
- /** Subclasses can override this to be told when one of the properies has been changed.
- */
+ /** Subclasses can override this to be told when one of the properies has been changed. */
virtual void propertyChanged();
private:
@@ -10555,6 +10670,8 @@ private:
PropertySet* fallbackProperties;
CriticalSection lock;
bool ignoreCaseOfKeys;
+
+ JUCE_LEAK_DETECTOR (PropertySet);
};
#endif // __JUCE_PROPERTYSET_JUCEHEADER__
@@ -10794,9 +10911,8 @@ public:
: rangeToConstrain.movedToStartAt (jlimit (start, end - otherLen, rangeToConstrain.getStart()));
}
- juce_UseDebuggingNewOperator
-
private:
+
ValueType start, end;
};
@@ -11458,9 +11574,8 @@ public:
/** Returns the type of scoped lock to use for locking this array */
typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;
- juce_UseDebuggingNewOperator
-
private:
+
ArrayAllocationBase data;
int numUsed;
};
@@ -11964,9 +12079,8 @@ public:
/** Returns the type of scoped lock to use for locking this array */
typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;
- juce_UseDebuggingNewOperator
-
private:
+
ArrayAllocationBase data;
int numUsed;
@@ -12249,9 +12363,8 @@ public:
return values != other.values;
}
- juce_UseDebuggingNewOperator
-
private:
+
// alternating start/end values of ranges of values that are present.
Array values;
@@ -12814,16 +12927,14 @@ public:
*/
void sendChangeMessage (bool dispatchSynchronously);
- juce_UseDebuggingNewOperator
-
protected:
+
friend class Value;
SortedSet valuesWithListeners;
void handleAsyncUpdate();
- ValueSource (const ValueSource&);
- ValueSource& operator= (const ValueSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ValueSource);
};
/** Creates a Value object that uses this valueSource object as its underlying data. */
@@ -12832,9 +12943,8 @@ public:
/** Returns the ValueSource that this value is referring to. */
ValueSource& getValueSource() throw() { return *value; }
- juce_UseDebuggingNewOperator
-
private:
+
friend class ValueSource;
ReferenceCountedObjectPtr value;
ListenerList listeners;
@@ -13238,8 +13348,6 @@ public:
*/
bool redo();
- juce_UseDebuggingNewOperator
-
private:
OwnedArray > transactions;
@@ -13248,9 +13356,7 @@ private:
int totalUnitsStored, maxNumUnitsToKeep, minimumTransactionsToKeep, nextIndex;
bool newTransaction, reentrancyCheck;
- // disallow copy constructor
- UndoManager (const UndoManager&);
- UndoManager& operator= (const UndoManager&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UndoManager);
};
#endif // __JUCE_UNDOMANAGER_JUCEHEADER__
@@ -13659,9 +13765,8 @@ public:
*/
static const ValueTree invalid;
- juce_UseDebuggingNewOperator
-
private:
+
class SetPropertyAction;
friend class SetPropertyAction;
class AddOrRemoveChildAction;
@@ -13706,10 +13811,9 @@ private:
bool isEquivalentTo (const SharedObject& other) const;
XmlElement* createXml() const;
- juce_UseDebuggingNewOperator
-
private:
SharedObject& operator= (const SharedObject&);
+ JUCE_LEAK_DETECTOR (SharedObject);
};
template
@@ -13822,16 +13926,14 @@ public:
const String& welcomeMessage,
const int maxInitialFileSizeBytes = 128 * 1024);
- juce_UseDebuggingNewOperator
-
private:
+
File logFile;
CriticalSection logLock;
void trimFileSize (int maxFileSizeBytes) const;
- FileLogger (const FileLogger&);
- FileLogger& operator= (const FileLogger&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FileLogger);
};
#endif // __JUCE_FILELOGGER_JUCEHEADER__
@@ -13989,6 +14091,9 @@ public:
/*** End of inlined file: juce_Initialisation.h ***/
+#endif
+#ifndef __JUCE_LEAKEDOBJECTDETECTOR_JUCEHEADER__
+
#endif
#ifndef __JUCE_LOGGER_JUCEHEADER__
@@ -14067,8 +14172,6 @@ public:
*/
void printStatistics();
- juce_UseDebuggingNewOperator
-
private:
String name;
@@ -14374,8 +14477,6 @@ public:
*/
int getRemoteId() const { return remoteId; }
- juce_UseDebuggingNewOperator
-
/** @internal */
void handleCallbackInternal();
@@ -14386,8 +14487,7 @@ private:
bool open (bool openInExclusiveMode);
- AppleRemoteDevice (const AppleRemoteDevice&);
- AppleRemoteDevice& operator= (const AppleRemoteDevice&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AppleRemoteDevice);
};
#endif
@@ -14491,10 +14591,11 @@ public:
*/
void setSeedRandomly();
- juce_UseDebuggingNewOperator
-
private:
+
int64 seed;
+
+ JUCE_LEAK_DETECTOR (Random);
};
#endif // __JUCE_RANDOM_JUCEHEADER__
@@ -15125,9 +15226,8 @@ public:
/** Sets this UUID from 16-bytes of raw data. */
Uuid& operator= (const uint8* rawData);
- juce_UseDebuggingNewOperator
-
private:
+
union
{
uint8 asBytes [16];
@@ -15135,6 +15235,8 @@ private:
int64 asInt64[2];
} value;
+
+ JUCE_LEAK_DETECTOR (Uuid);
};
#endif // __JUCE_UUID_JUCEHEADER__
@@ -15177,13 +15279,14 @@ public:
/** Decrypts a pair of 32-bit integers. */
void decrypt (uint32& data1, uint32& data2) const throw();
- juce_UseDebuggingNewOperator
-
private:
+
uint32 p[18];
HeapBlock s[4];
uint32 F (uint32 x) const throw();
+
+ JUCE_LEAK_DETECTOR (BlowFish);
};
#endif // __JUCE_BLOWFISH_JUCEHEADER__
@@ -15260,9 +15363,8 @@ public:
/** Compares this to another MD5. */
bool operator!= (const MD5& other) const;
- juce_UseDebuggingNewOperator
-
private:
+
uint8 result [16];
struct ProcessContext
@@ -15279,6 +15381,8 @@ private:
};
void processStream (InputStream& input, int64 numBytesToRead);
+
+ JUCE_LEAK_DETECTOR (MD5);
};
#endif // __JUCE_MD5_JUCEHEADER__
@@ -15412,13 +15516,15 @@ public:
const int* randomSeeds = 0,
int numRandomSeeds = 0);
- juce_UseDebuggingNewOperator
-
protected:
+
BigInteger part1, part2;
private:
+
static const BigInteger findBestCommonDivisor (const BigInteger& p, const BigInteger& q);
+
+ JUCE_LEAK_DETECTOR (RSAKey);
};
#endif // __JUCE_RSAKEY_JUCEHEADER__
@@ -15512,8 +15618,6 @@ public:
*/
float getEstimatedProgress() const;
- juce_UseDebuggingNewOperator
-
private:
class NativeIterator
@@ -15528,15 +15632,12 @@ private:
class Pimpl;
- juce_UseDebuggingNewOperator
-
private:
friend class DirectoryIterator;
friend class ScopedPointer;
ScopedPointer pimpl;
- NativeIterator (const NativeIterator&);
- NativeIterator& operator= (const NativeIterator&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NativeIterator);
};
friend class ScopedPointer;
@@ -15550,8 +15651,7 @@ private:
ScopedPointer subIterator;
File currentFile;
- DirectoryIterator (const DirectoryIterator&);
- DirectoryIterator& operator= (const DirectoryIterator&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectoryIterator);
};
#endif // __JUCE_DIRECTORYITERATOR_JUCEHEADER__
@@ -15595,9 +15695,8 @@ public:
int64 getPosition();
bool setPosition (int64 pos);
- juce_UseDebuggingNewOperator
-
private:
+
File file;
void* fileHandle;
int64 currentPosition, totalSize;
@@ -15607,8 +15706,7 @@ private:
void closeHandle();
size_t readInternal (void* buffer, size_t numBytes);
- FileInputStream (const FileInputStream&);
- FileInputStream& operator= (const FileInputStream&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FileInputStream);
};
#endif // __JUCE_FILEINPUTSTREAM_JUCEHEADER__
@@ -15666,9 +15764,8 @@ public:
bool setPosition (int64 pos);
bool write (const void* data, int numBytes);
- juce_UseDebuggingNewOperator
-
private:
+
File file;
void* fileHandle;
int64 currentPosition;
@@ -15681,8 +15778,7 @@ private:
int64 setPositionInternal (int64 newPosition);
int writeInternal (const void* data, int numBytes);
- FileOutputStream (const FileOutputStream&);
- FileOutputStream& operator= (const FileOutputStream&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FileOutputStream);
};
#endif // __JUCE_FILEOUTPUTSTREAM_JUCEHEADER__
@@ -15815,12 +15911,13 @@ public:
bool isFileInPath (const File& fileToCheck,
bool checkRecursively) const;
- juce_UseDebuggingNewOperator
-
private:
+
StringArray directories;
void init (const String& path);
+
+ JUCE_LEAK_DETECTOR (FileSearchPath);
};
#endif // __JUCE_FILESEARCHPATH_JUCEHEADER__
@@ -15898,17 +15995,15 @@ public:
*/
void cancelPendingReads();
- juce_UseDebuggingNewOperator
-
private:
+
void* internal;
String currentPipeName;
CriticalSection lock;
- NamedPipe (const NamedPipe&);
- NamedPipe& operator= (const NamedPipe&);
-
bool openInternal (const String& pipeName, const bool createPipe);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NamedPipe);
};
#endif // __JUCE_NAMEDPIPE_JUCEHEADER__
@@ -16038,16 +16133,13 @@ public:
*/
bool deleteTemporaryFile() const;
- juce_UseDebuggingNewOperator
-
private:
File temporaryFile, targetFile;
void createTempFile (const File& parentDirectory, String name, const String& suffix, int optionFlags);
- TemporaryFile (const TemporaryFile&);
- TemporaryFile& operator= (const TemporaryFile&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TemporaryFile);
};
#endif // __JUCE_TEMPORARYFILE_JUCEHEADER__
@@ -16102,7 +16194,9 @@ public:
*/
virtual int64 hashCode() const = 0;
- juce_UseDebuggingNewOperator
+private:
+
+ JUCE_LEAK_DETECTOR (InputSource);
};
#endif // __JUCE_INPUTSOURCE_JUCEHEADER__
@@ -16235,9 +16329,8 @@ public:
const File& targetDirectory,
bool shouldOverwriteFiles = true);
- juce_UseDebuggingNewOperator
-
private:
+
class ZipInputStream;
class ZipFilenameComparator;
class ZipEntryInfo;
@@ -16259,8 +16352,7 @@ private:
int findEndOfZipEntryTable (InputStream& input, int& numEntries);
static int compareElements (const ZipEntryInfo* first, const ZipEntryInfo* second);
- ZipFile (const ZipFile&);
- ZipFile& operator= (const ZipFile&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ZipFile);
};
#endif // __JUCE_ZIPFILE_JUCEHEADER__
@@ -16461,16 +16553,15 @@ public:
*/
StreamingSocket* waitForNextConnection() const;
- juce_UseDebuggingNewOperator
-
private:
+
String hostName;
int volatile portNumber, handle;
bool connected, isListener;
StreamingSocket (const String& hostname, int portNumber, int handle);
- StreamingSocket (const StreamingSocket&);
- StreamingSocket& operator= (const StreamingSocket&);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StreamingSocket);
};
/**
@@ -16584,17 +16675,16 @@ public:
*/
DatagramSocket* waitForNextConnection() const;
- juce_UseDebuggingNewOperator
-
private:
+
String hostName;
int volatile portNumber, handle;
bool connected, allowBroadcast;
void* serverAddress;
DatagramSocket (const String& hostname, int portNumber, int handle, int localPortNumber);
- DatagramSocket (const DatagramSocket&);
- DatagramSocket& operator= (const DatagramSocket&);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DatagramSocket);
};
#endif // __JUCE_SOCKET_JUCEHEADER__
@@ -16854,11 +16944,12 @@ public:
*/
static const String removeEscapeChars (const String& stringToRemoveEscapeCharsFrom);
- juce_UseDebuggingNewOperator
-
private:
+
String url, postData;
StringPairArray parameters, filesToUpload, mimeTypes;
+
+ JUCE_LEAK_DETECTOR (URL);
};
#endif // __JUCE_URL_JUCEHEADER__
@@ -16916,9 +17007,8 @@ public:
const String readString();
bool isExhausted();
- juce_UseDebuggingNewOperator
-
private:
+
InputStream* const source;
ScopedPointer sourceToDelete;
int bufferSize;
@@ -16926,8 +17016,7 @@ private:
HeapBlock buffer;
void ensureBuffered();
- BufferedInputStream (const BufferedInputStream&);
- BufferedInputStream& operator= (const BufferedInputStream&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BufferedInputStream);
};
#endif // __JUCE_BUFFEREDINPUTSTREAM_JUCEHEADER__
@@ -16957,13 +17046,11 @@ public:
InputStream* createInputStreamFor (const String& relatedItemPath);
int64 hashCode() const;
- juce_UseDebuggingNewOperator
-
private:
+
const File file;
- FileInputSource (const FileInputSource&);
- FileInputSource& operator= (const FileInputSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FileInputSource);
};
#endif // __JUCE_FILEINPUTSOURCE_JUCEHEADER__
@@ -17012,9 +17099,8 @@ public:
bool setPosition (int64 newPosition);
bool write (const void* destBuffer, int howMany);
- juce_UseDebuggingNewOperator
-
private:
+
OutputStream* const destStream;
ScopedPointer streamToDelete;
HeapBlock buffer;
@@ -17023,8 +17109,7 @@ private:
ScopedPointer helper;
bool doNextBlock();
- GZIPCompressorOutputStream (const GZIPCompressorOutputStream&);
- GZIPCompressorOutputStream& operator= (const GZIPCompressorOutputStream&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GZIPCompressorOutputStream);
};
#endif // __JUCE_GZIPCOMPRESSOROUTPUTSTREAM_JUCEHEADER__
@@ -17083,8 +17168,6 @@ public:
bool isExhausted();
int read (void* destBuffer, int maxBytesToRead);
- juce_UseDebuggingNewOperator
-
private:
InputStream* const sourceStream;
ScopedPointer streamToDelete;
@@ -17099,8 +17182,7 @@ private:
friend class ScopedPointer ;
ScopedPointer helper;
- GZIPDecompressorInputStream (const GZIPDecompressorInputStream&);
- GZIPDecompressorInputStream& operator= (const GZIPDecompressorInputStream&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GZIPDecompressorInputStream);
};
#endif // __JUCE_GZIPDECOMPRESSORINPUTSTREAM_JUCEHEADER__
@@ -17165,15 +17247,13 @@ public:
bool isExhausted();
int read (void* destBuffer, int maxBytesToRead);
- juce_UseDebuggingNewOperator
-
private:
+
const char* data;
size_t dataSize, position;
MemoryBlock internalCopy;
- MemoryInputStream (const MemoryInputStream&);
- MemoryInputStream& operator= (const MemoryInputStream&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MemoryInputStream);
};
#endif // __JUCE_MEMORYINPUTSTREAM_JUCEHEADER__
@@ -17262,15 +17342,13 @@ public:
bool setPosition (int64 newPosition);
int writeFromInputStream (InputStream& source, int64 maxNumBytesToWrite);
- juce_UseDebuggingNewOperator
-
private:
+
MemoryBlock& data;
MemoryBlock internalBlock;
size_t position, size;
- MemoryOutputStream (const MemoryOutputStream&);
- MemoryOutputStream& operator= (const MemoryOutputStream&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MemoryOutputStream);
};
/** Copies all the data that has been written to a MemoryOutputStream into another stream. */
@@ -17334,15 +17412,12 @@ public:
int read (void* destBuffer, int maxBytesToRead);
bool isExhausted();
- juce_UseDebuggingNewOperator
-
private:
InputStream* const source;
ScopedPointer sourceToDelete;
const int64 startPositionInSourceStream, lengthOfSourceStream;
- SubregionStream (const SubregionStream&);
- SubregionStream& operator= (const SubregionStream&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SubregionStream);
};
#endif // __JUCE_SUBREGIONSTREAM_JUCEHEADER__
@@ -17502,14 +17577,15 @@ public:
*/
void setIgnoresCase (bool shouldIgnoreCase);
- juce_UseDebuggingNewOperator
-
private:
+
String languageName;
StringArray countryCodes;
StringPairArray translations;
void loadFromText (const String& fileContents);
+
+ JUCE_LEAK_DETECTOR (LocalisedStrings);
};
#endif // __JUCE_LOCALISEDSTRINGS_JUCEHEADER__
@@ -17648,8 +17724,6 @@ public:
*/
static XmlElement* parse (const String& xmlData);
- juce_UseDebuggingNewOperator
-
private:
String originalText;
const juce_wchar* input;
@@ -17675,8 +17749,7 @@ private:
const String expandExternalEntity (const String& entity);
const String getParameterEntity (const String& entity);
- XmlDocument (const XmlDocument&);
- XmlDocument& operator= (const XmlDocument&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (XmlDocument);
};
#endif // __JUCE_XMLDOCUMENT_JUCEHEADER__
@@ -17780,8 +17853,6 @@ public:
ScopedLockType& operator= (const ScopedLockType&);
};
- juce_UseDebuggingNewOperator
-
private:
class Pimpl;
@@ -17944,13 +18015,11 @@ public:
*/
void reset() const throw();
- juce_UseDebuggingNewOperator
-
private:
+
void* internal;
- WaitableEvent (const WaitableEvent&);
- WaitableEvent& operator= (const WaitableEvent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WaitableEvent);
};
#endif // __JUCE_WAITABLEEVENT_JUCEHEADER__
@@ -18191,9 +18260,8 @@ public:
*/
static void stopAllThreads (int timeoutInMillisecs);
- juce_UseDebuggingNewOperator
-
private:
+
const String threadName_;
void* volatile threadHandle_;
CriticalSection startStopLock;
@@ -18209,8 +18277,7 @@ private:
static Array runningThreads;
static CriticalSection runningThreadsLock;
- Thread (const Thread&);
- Thread& operator= (const Thread&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Thread);
};
#endif // __JUCE_THREAD_JUCEHEADER__
@@ -18302,8 +18369,6 @@ public:
*/
void exitWrite() const throw();
- juce_UseDebuggingNewOperator
-
private:
CriticalSection accessLock;
@@ -18632,8 +18697,6 @@ public:
*/
void signalJobShouldExit();
- juce_UseDebuggingNewOperator
-
private:
friend class ThreadPool;
friend class ThreadPoolThread;
@@ -18641,8 +18704,7 @@ private:
ThreadPool* pool;
bool shouldStop, isActive, shouldBeDeleted;
- ThreadPoolJob (const ThreadPoolJob&);
- ThreadPoolJob& operator= (const ThreadPoolJob&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ThreadPoolJob);
};
/**
@@ -18795,9 +18857,8 @@ public:
*/
bool setThreadPriorities (int newPriority);
- juce_UseDebuggingNewOperator
-
private:
+
const int threadStopTimeout;
int priority;
class ThreadPoolThread;
@@ -18811,8 +18872,7 @@ private:
friend class ThreadPoolThread;
bool runNextJob();
- ThreadPool (const ThreadPool&);
- ThreadPool& operator= (const ThreadPool&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ThreadPool);
};
#endif // __JUCE_THREADPOOL_JUCEHEADER__
@@ -18910,8 +18970,6 @@ public:
/** @internal */
void run();
- juce_UseDebuggingNewOperator
-
private:
CriticalSection callbackLock, listLock;
Array clients;
@@ -18919,8 +18977,7 @@ private:
TimeSliceClient* clientBeingCalled;
bool clientsChanged;
- TimeSliceThread (const TimeSliceThread&);
- TimeSliceThread& operator= (const TimeSliceThread&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TimeSliceThread);
};
#endif // __JUCE_TIMESLICETHREAD_JUCEHEADER__
@@ -19072,9 +19129,8 @@ public:
*/
static void hideWaitCursor();
- juce_UseDebuggingNewOperator
-
private:
+
class SharedCursorHandle;
friend class SharedCursorHandle;
SharedCursorHandle* cursorHandle;
@@ -19087,6 +19143,8 @@ private:
static void* createMouseCursorFromImage (const Image& image, int hotspotX, int hotspotY);
static void* createStandardMouseCursor (MouseCursor::StandardCursorType type);
static void deleteMouseCursor (void* cursorHandle, bool isStandard);
+
+ JUCE_LEAK_DETECTOR (MouseCursor);
};
#endif // __JUCE_MOUSECURSOR_JUCEHEADER__
@@ -19648,7 +19706,9 @@ public:
float mat00, mat01, mat02;
float mat10, mat11, mat12;
- juce_UseDebuggingNewOperator
+private:
+
+ JUCE_LEAK_DETECTOR (AffineTransform);
};
#endif // __JUCE_AFFINETRANSFORM_JUCEHEADER__
@@ -19788,9 +19848,8 @@ public:
/** Returns the point as a string in the form "x, y". */
const String toString() const { return String (x) + ", " + String (y); }
- juce_UseDebuggingNewOperator
-
private:
+
ValueType x, y;
};
@@ -20069,9 +20128,8 @@ public:
*/
static int getDoubleClickTimeout() throw();
- juce_UseDebuggingNewOperator
-
private:
+
const Point mouseDownPos;
const Time mouseDownTime;
const int numberOfClicks;
@@ -20079,6 +20137,7 @@ private:
static int doubleClickTimeOutMs;
MouseEvent& operator= (const MouseEvent&);
+ JUCE_LEAK_DETECTOR (MouseEvent);
};
#endif // __JUCE_MOUSEEVENT_JUCEHEADER__
@@ -20381,13 +20440,13 @@ public:
static const int fastForwardKey; /**< key-code for a multimedia 'fast-forward' key, (not all keyboards will have one) */
static const int rewindKey; /**< key-code for a multimedia 'rewind' key, (not all keyboards will have one) */
- juce_UseDebuggingNewOperator
-
private:
int keyCode;
ModifierKeys mods;
juce_wchar textCharacter;
+
+ JUCE_LEAK_DETECTOR (KeyPress);
};
#endif // __JUCE_KEYPRESS_JUCEHEADER__
@@ -20842,9 +20901,8 @@ public:
return Line (start, getPointAlongLine (length - jmin (distanceToShortenBy, length)));
}
- juce_UseDebuggingNewOperator
-
private:
+
Point start, end;
static bool findIntersection (const Point& p1, const Point& p2,
@@ -21475,7 +21533,7 @@ public:
This should only be used on floating point rectangles.
*/
- const Rectangle transformed (const AffineTransform& transform) const throw()
+ const Rectangle transformed (const AffineTransform& transform) const throw()
{
float x1 = x, y1 = y;
float x2 = x + w, y2 = y;
@@ -21604,8 +21662,6 @@ public:
toks[3].trim().getIntValue());
}
- juce_UseDebuggingNewOperator
-
private:
friend class RectangleList;
ValueType x, y, w, h;
@@ -22432,9 +22488,8 @@ public:
*/
void restoreFromString (const String& stringVersion);
- juce_UseDebuggingNewOperator
-
private:
+
friend class PathFlatteningIterator;
friend class Path::Iterator;
ArrayAllocationBase data;
@@ -22447,6 +22502,8 @@ private:
static const float quadMarker;
static const float cubicMarker;
static const float closeSubPathMarker;
+
+ JUCE_LEAK_DETECTOR (Path);
};
#endif // __JUCE_PATH_JUCEHEADER__
@@ -22521,9 +22578,8 @@ public:
*/
virtual bool getOutlineForGlyph (int glyphNumber, Path& path) = 0;
- juce_UseDebuggingNewOperator
-
protected:
+
String name;
bool isFallbackFont;
@@ -22532,8 +22588,7 @@ protected:
static const Ptr getFallbackTypeface();
private:
- Typeface (const Typeface&);
- Typeface& operator= (const Typeface&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Typeface);
};
/** A typeface that can be populated with custom glyphs.
@@ -22614,9 +22669,8 @@ public:
bool getOutlineForGlyph (int glyphNumber, Path& path);
int getGlyphForCharacter (juce_wchar character);
- juce_UseDebuggingNewOperator
-
protected:
+
juce_wchar defaultCharacter;
float ascent;
bool isBold, isItalic;
@@ -22636,11 +22690,10 @@ private:
OwnedArray glyphs;
short lookupTable [128];
- CustomTypeface (const CustomTypeface&);
- CustomTypeface& operator= (const CustomTypeface&);
-
GlyphInfo* findGlyph (const juce_wchar character, bool loadIfNeeded) throw();
GlyphInfo* findGlyphSubstituting (juce_wchar character) throw();
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomTypeface);
};
#endif // __JUCE_TYPEFACE_JUCEHEADER__
@@ -22959,8 +23012,6 @@ public:
*/
static const Font fromString (const String& fontDescription);
- juce_UseDebuggingNewOperator
-
private:
friend class FontGlyphAlphaMap;
@@ -22982,6 +23033,8 @@ private:
ReferenceCountedObjectPtr font;
void dupeInternalIfShared();
+
+ JUCE_LEAK_DETECTOR (Font);
};
#endif // __JUCE_FONT_JUCEHEADER__
@@ -23138,8 +23191,6 @@ public:
/** Sets the end-cap style. */
void setEndStyle (EndCapStyle newStyle) throw() { endStyle = newStyle; }
- juce_UseDebuggingNewOperator
-
/** Compares the stroke thickness, joint and end styles of two stroke types. */
bool operator== (const PathStrokeType& other) const throw();
@@ -23151,6 +23202,8 @@ private:
float thickness;
JointStyle jointStyle;
EndCapStyle endStyle;
+
+ JUCE_LEAK_DETECTOR (PathStrokeType);
};
#endif // __JUCE_PATHSTROKETYPE_JUCEHEADER__
@@ -24028,9 +24081,8 @@ public:
/** Returns the colour as a hex string in the form RRGGBB or AARRGGBB. */
const String toDisplayString (bool includeAlphaValue) const;
- juce_UseDebuggingNewOperator
-
private:
+
PixelARGB argb;
};
@@ -24234,9 +24286,8 @@ public:
bool operator== (const ColourGradient& other) const throw();
bool operator!= (const ColourGradient& other) const throw();
- juce_UseDebuggingNewOperator
-
private:
+
struct ColourPoint
{
ColourPoint() throw() {}
@@ -24253,6 +24304,8 @@ private:
};
Array colours;
+
+ JUCE_LEAK_DETECTOR (ColourGradient);
};
#endif // __JUCE_COLOURGRADIENT_JUCEHEADER__
@@ -24990,8 +25043,6 @@ public:
/** Returns true if this context is drawing to a vector-based device, such as a printer. */
bool isVectorDevice() const;
- juce_UseDebuggingNewOperator
-
/** Create a graphics that uses a given low-level renderer.
For internal use only.
NB. The context will NOT be deleted by this object when it is deleted.
@@ -25009,8 +25060,7 @@ private:
bool saveStatePending;
void saveStateIfPending();
- Graphics (const Graphics&);
- Graphics& operator= (const Graphics& other);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Graphics);
};
#endif // __JUCE_GRAPHICS_JUCEHEADER__
@@ -25427,8 +25477,7 @@ public:
uint8* imageData;
NamedValueSet userData;
- SharedImage (const SharedImage&);
- SharedImage& operator= (const SharedImage&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SharedImage);
};
/** @internal */
@@ -25436,13 +25485,14 @@ public:
/** @internal */
explicit Image (SharedImage* instance);
- juce_UseDebuggingNewOperator
-
private:
+
friend class SharedImage;
friend class BitmapData;
ReferenceCountedObjectPtr image;
+
+ JUCE_LEAK_DETECTOR (Image);
};
#endif // __JUCE_IMAGE_JUCEHEADER__
@@ -25644,8 +25694,6 @@ public:
/** Returns the current rectangle. */
const Rectangle* getRectangle() const throw() { return current; }
- juce_UseDebuggingNewOperator
-
private:
const Rectangle* current;
const RectangleList& owner;
@@ -25655,11 +25703,12 @@ public:
Iterator& operator= (const Iterator&);
};
- juce_UseDebuggingNewOperator
-
private:
+
friend class Iterator;
Array > rects;
+
+ JUCE_LEAK_DETECTOR (RectangleList);
};
#endif // __JUCE_RECTANGLELIST_JUCEHEADER__
@@ -25751,10 +25800,11 @@ public:
bool operator== (const BorderSize& other) const throw();
bool operator!= (const BorderSize& other) const throw();
- juce_UseDebuggingNewOperator
-
private:
+
int top, left, bottom, right;
+
+ JUCE_LEAK_DETECTOR (BorderSize);
};
#endif // __JUCE_BORDERSIZE_JUCEHEADER__
@@ -27913,9 +27963,8 @@ public:
bool operator== (ComponentType* component) const throw() { return comp == component; }
bool operator!= (ComponentType* component) const throw() { return comp != component; }
- juce_UseDebuggingNewOperator
-
private:
+
ComponentType* comp;
void attach() { if (comp != 0) comp->addComponentListener (this); }
@@ -27964,8 +28013,6 @@ public:
const Point& positionRelativeToThis) const;
#endif
- juce_UseDebuggingNewOperator
-
private:
friend class ComponentPeer;
@@ -28058,11 +28105,9 @@ private:
friend class ComponentHelpers;
/* Components aren't allowed to have copy constructors, as this would mess up parent hierarchies.
- You might need to give your subclasses a private dummy constructor like this one to avoid
- compiler warnings.
+ You might need to give your subclasses a private dummy constructor to avoid compiler warnings.
*/
- Component (const Component&);
- Component& operator= (const Component&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Component);
#if JUCE_CATCH_DEPRECATED_CODE_MISUSE
// This is included here just to cause a compile error if your code is still handling
@@ -28360,15 +28405,12 @@ public:
int intParameter3; /**< user-defined integer value. */
void* pointerParameter; /**< user-defined pointer value. */
- juce_UseDebuggingNewOperator
-
private:
friend class MessageListener;
friend class MessageManager;
MessageListener* messageRecipient;
- Message (const Message&);
- Message& operator= (const Message&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Message);
};
#endif // __JUCE_MESSAGE_JUCEHEADER__
@@ -28626,9 +28668,8 @@ public:
*/
ApplicationCommandTarget* findFirstTargetParentComponent();
- juce_UseDebuggingNewOperator
-
private:
+
// (for async invocation of commands)
class CommandTargetMessageInvoker : public MessageListener
{
@@ -28650,8 +28691,7 @@ private:
friend class CommandTargetMessageInvoker;
bool tryToInvoke (const InvocationInfo& info, bool async);
- ApplicationCommandTarget (const ApplicationCommandTarget&);
- ApplicationCommandTarget& operator= (const ApplicationCommandTarget&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ApplicationCommandTarget);
};
#endif // __JUCE_APPLICATIONCOMMANDTARGET_JUCEHEADER__
@@ -29184,15 +29224,16 @@ public:
/** Returns true if the specified component is currently being animated. */
bool isAnimating (Component* component) const;
- juce_UseDebuggingNewOperator
-
private:
+
class AnimationTask;
OwnedArray tasks;
uint32 lastTime;
AnimationTask* findTaskFor (Component* component) const;
void timerCallback();
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentAnimator);
};
#endif // __JUCE_COMPONENTANIMATOR_JUCEHEADER__
@@ -29451,8 +29492,6 @@ public:
*/
bool isOrientationEnabled (DisplayOrientation orientation) const throw();
- juce_UseDebuggingNewOperator
-
/** Tells this object to refresh its idea of what the screen resolution is.
(Called internally by the native code).
@@ -29511,8 +29550,7 @@ private:
Desktop();
~Desktop();
- Desktop (const Desktop&);
- Desktop& operator= (const Desktop&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Desktop);
};
#endif // __JUCE_DESKTOP_JUCEHEADER__
@@ -29789,8 +29827,6 @@ public:
*/
static ApplicationCommandTarget* findTargetForComponent (Component* component);
- juce_UseDebuggingNewOperator
-
private:
OwnedArray commands;
@@ -29808,8 +29844,7 @@ private:
virtual short getFirstCommandTarget() { return 0; }
#endif
- ApplicationCommandManager (const ApplicationCommandManager&);
- ApplicationCommandManager& operator= (const ApplicationCommandManager&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ApplicationCommandManager);
};
/**
@@ -30001,8 +30036,6 @@ public:
const String& folderName,
bool commonToAllUsers);
- juce_UseDebuggingNewOperator
-
protected:
virtual void propertyChanged();
@@ -30019,8 +30052,7 @@ private:
void timerCallback();
- PropertiesFile (const PropertiesFile&);
- PropertiesFile& operator= (const PropertiesFile&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PropertiesFile);
};
#endif // __JUCE_PROPERTIESFILE_JUCEHEADER__
@@ -30132,8 +30164,6 @@ public:
*/
void closeFiles();
- juce_UseDebuggingNewOperator
-
private:
ScopedPointer userProps, commonProps;
@@ -30143,10 +30173,9 @@ private:
int commonSettingsAreReadOnly;
InterProcessLock* processLock;
- ApplicationProperties (const ApplicationProperties&);
- ApplicationProperties& operator= (const ApplicationProperties&);
-
void openFiles();
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ApplicationProperties);
};
#endif // __JUCE_APPLICATIONPROPERTIES_JUCEHEADER__
@@ -30957,9 +30986,8 @@ public:
int64 startSampleInFile,
int numSamples) = 0;
- juce_UseDebuggingNewOperator
-
protected:
+
/** Used by AudioFormatReader subclasses to copy data to different formats. */
template
struct ReadHelper
@@ -30988,8 +31016,7 @@ protected:
private:
String formatName;
- AudioFormatReader (const AudioFormatReader&);
- AudioFormatReader& operator= (const AudioFormatReader&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatReader);
};
#endif // __JUCE_AUDIOFORMATREADER_JUCEHEADER__
@@ -31395,9 +31422,8 @@ public:
int startSample,
int numSamples) const;
- juce_UseDebuggingNewOperator
-
private:
+
int numChannels, size;
size_t allocatedBytes;
float** channels;
@@ -31406,6 +31432,8 @@ private:
void allocateData();
void allocateChannels (float** dataToReferTo);
+
+ JUCE_LEAK_DETECTOR (AudioSampleBuffer);
};
#endif // __JUCE_AUDIOSAMPLEBUFFER_JUCEHEADER__
@@ -31689,9 +31717,8 @@ public:
ScopedPointer buffer;
};
- juce_UseDebuggingNewOperator
-
protected:
+
/** The sample rate of the stream. */
double sampleRate;
@@ -31737,8 +31764,7 @@ private:
String formatName;
friend class ThreadedWriter;
- AudioFormatWriter (const AudioFormatWriter&);
- AudioFormatWriter& operator= (const AudioFormatWriter&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatWriter);
};
#endif // __JUCE_AUDIOFORMATWRITER_JUCEHEADER__
@@ -31914,7 +31940,8 @@ public:
const StringPairArray& metadataValues,
int qualityOptionIndex);
- juce_UseDebuggingNewOperator
+private:
+ JUCE_LEAK_DETECTOR (AiffAudioFormat);
};
#endif // __JUCE_AIFFAUDIOFORMAT_JUCEHEADER__
@@ -32049,14 +32076,15 @@ public:
*/
void abortBurn();
- juce_UseDebuggingNewOperator
-
private:
+
AudioCDBurner (const int deviceIndex);
class Pimpl;
friend class ScopedPointer;
ScopedPointer pimpl;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioCDBurner);
};
#endif
@@ -32197,9 +32225,8 @@ public:
samplesPerFrame = 44100 / framesPerSecond
};
- juce_UseDebuggingNewOperator
-
private:
+
Array trackStartSamples;
#if JUCE_MAC
@@ -32222,8 +32249,7 @@ private:
AudioCDReader();
#endif
- AudioCDReader (const AudioCDReader&);
- AudioCDReader& operator= (const AudioCDReader&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioCDReader);
};
#endif
@@ -32340,11 +32366,12 @@ public:
*/
AudioFormatReader* createReaderFor (InputStream* audioFileStream);
- juce_UseDebuggingNewOperator
-
private:
+
OwnedArray knownFormats;
int defaultFormatIndex;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatManager);
};
#endif // __JUCE_AUDIOFORMATMANAGER_JUCEHEADER__
@@ -32409,15 +32436,13 @@ public:
float& lowestRight,
float& highestRight);
- juce_UseDebuggingNewOperator
-
private:
+
AudioFormatReader* const source;
int64 startSample, length;
const bool deleteSourceWhenDeleted;
- AudioSubsectionReader (const AudioSubsectionReader&);
- AudioSubsectionReader& operator= (const AudioSubsectionReader&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioSubsectionReader);
};
#endif // __JUCE_AUDIOSUBSECTIONREADER_JUCEHEADER__
@@ -32554,9 +32579,8 @@ public:
/** @internal */
void timerCallback();
- juce_UseDebuggingNewOperator
-
private:
+
AudioFormatManager& formatManagerToUse;
AudioThumbnailCache& cache;
ScopedPointer source;
@@ -32583,6 +32607,8 @@ private:
// returns true if more needs to be read
bool readNextBlockFromAudioFile (AudioFormatReader& reader);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioThumbnail);
};
#endif // __JUCE_AUDIOTHUMBNAIL_JUCEHEADER__
@@ -32640,8 +32666,6 @@ public:
*/
void storeThumb (const AudioThumbnail& thumb, int64 hashCode);
- juce_UseDebuggingNewOperator
-
private:
OwnedArray thumbs;
@@ -32650,6 +32674,8 @@ private:
friend class AudioThumbnail;
void addThumbnail (AudioThumbnail* thumb);
void removeThumbnail (AudioThumbnail* thumb);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioThumbnailCache);
};
#endif // __JUCE_AUDIOTHUMBNAILCACHE_JUCEHEADER__
@@ -32697,7 +32723,8 @@ public:
const StringPairArray& metadataValues,
int qualityOptionIndex);
- juce_UseDebuggingNewOperator
+private:
+ JUCE_LEAK_DETECTOR (FlacAudioFormat);
};
#endif
@@ -32757,7 +32784,8 @@ public:
const StringPairArray& metadataValues,
int qualityOptionIndex);
- juce_UseDebuggingNewOperator
+private:
+ JUCE_LEAK_DETECTOR (OggVorbisAudioFormat);
};
#endif
@@ -32807,7 +32835,8 @@ public:
const StringPairArray& metadataValues,
int qualityOptionIndex);
- juce_UseDebuggingNewOperator
+private:
+ JUCE_LEAK_DETECTOR (QuickTimeAudioFormat);
};
#endif
@@ -32931,7 +32960,8 @@ public:
*/
bool replaceMetadataInFile (const File& wavFile, const StringPairArray& newMetadata);
- juce_UseDebuggingNewOperator
+private:
+ JUCE_LEAK_DETECTOR (WavAudioFormat);
};
#endif // __JUCE_WAVAUDIOFORMAT_JUCEHEADER__
@@ -33054,9 +33084,8 @@ public:
/** Implements the PositionableAudioSource method. */
int getTotalLength() const;
- juce_UseDebuggingNewOperator
-
private:
+
AudioFormatReader* reader;
bool deleteReader;
@@ -33065,8 +33094,7 @@ private:
void readBufferSection (int start, int length, AudioSampleBuffer& buffer, int startSample);
- AudioFormatReaderSource (const AudioFormatReaderSource&);
- AudioFormatReaderSource& operator= (const AudioFormatReaderSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioFormatReaderSource);
};
#endif // __JUCE_AUDIOFORMATREADERSOURCE_JUCEHEADER__
@@ -33441,8 +33469,6 @@ public:
/** Implementation of the AudioIODeviceCallback method. */
void audioDeviceStopped();
- juce_UseDebuggingNewOperator
-
private:
CriticalSection readLock;
@@ -33455,8 +33481,7 @@ private:
AudioSampleBuffer tempBuffer;
float lastGain, gain;
- AudioSourcePlayer (const AudioSourcePlayer&);
- AudioSourcePlayer& operator= (const AudioSourcePlayer&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioSourcePlayer);
};
#endif // __JUCE_AUDIOSOURCEPLAYER_JUCEHEADER__
@@ -33527,8 +33552,6 @@ public:
/** Implements the PositionableAudioSource method. */
bool isLooping() const { return source->isLooping(); }
- juce_UseDebuggingNewOperator
-
private:
PositionableAudioSource* source;
@@ -33544,8 +33567,7 @@ private:
bool readNextBufferChunk();
void readBufferSection (int start, int length, int bufferOffset);
- BufferingAudioSource (const BufferingAudioSource&);
- BufferingAudioSource& operator= (const BufferingAudioSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BufferingAudioSource);
};
#endif // __JUCE_BUFFERINGAUDIOSOURCE_JUCEHEADER__
@@ -33599,9 +33621,8 @@ public:
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
- juce_UseDebuggingNewOperator
-
private:
+
AudioSource* const input;
const bool deleteInputWhenDeleted;
double ratio, lastRatio;
@@ -33626,8 +33647,7 @@ private:
void applyFilter (float* samples, int num, FilterState& fs);
- ResamplingAudioSource (const ResamplingAudioSource&);
- ResamplingAudioSource& operator= (const ResamplingAudioSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ResamplingAudioSource);
};
#endif // __JUCE_RESAMPLINGAUDIOSOURCE_JUCEHEADER__
@@ -33750,9 +33770,8 @@ public:
/** Implements the PositionableAudioSource method. */
bool isLooping() const;
- juce_UseDebuggingNewOperator
-
private:
+
PositionableAudioSource* source;
ResamplingAudioSource* resamplerSource;
BufferingAudioSource* bufferingSource;
@@ -33766,8 +33785,7 @@ private:
int blockSize, readAheadBufferSize;
bool isPrepared, inputStreamEOF;
- AudioTransportSource (const AudioTransportSource&);
- AudioTransportSource& operator= (const AudioTransportSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioTransportSource);
};
#endif // __JUCE_AUDIOTRANSPORTSOURCE_JUCEHEADER__
@@ -33880,9 +33898,8 @@ public:
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
- juce_UseDebuggingNewOperator
-
private:
+
int requiredNumberOfChannels;
Array remappedInputs, remappedOutputs;
@@ -33894,8 +33911,7 @@ private:
CriticalSection lock;
- ChannelRemappingAudioSource (const ChannelRemappingAudioSource&);
- ChannelRemappingAudioSource& operator= (const ChannelRemappingAudioSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelRemappingAudioSource);
};
#endif // __JUCE_CHANNELREMAPPINGAUDIOSOURCE_JUCEHEADER__
@@ -34010,9 +34026,8 @@ public:
*/
void copyCoefficientsFrom (const IIRFilter& other) throw();
- juce_UseDebuggingNewOperator
-
protected:
+
CriticalSection processLock;
void setCoefficients (double c1, double c2, double c3,
@@ -34024,6 +34039,7 @@ protected:
// (use the copyCoefficientsFrom() method instead of this operator)
IIRFilter& operator= (const IIRFilter&);
+ JUCE_LEAK_DETECTOR (IIRFilter);
};
#endif // __JUCE_IIRFILTER_JUCEHEADER__
@@ -34056,16 +34072,13 @@ public:
void releaseResources();
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
- juce_UseDebuggingNewOperator
-
private:
AudioSource* const input;
const bool deleteInputWhenDeleted;
OwnedArray iirFilters;
- IIRFilterAudioSource (const IIRFilterAudioSource&);
- IIRFilterAudioSource& operator= (const IIRFilterAudioSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (IIRFilterAudioSource);
};
#endif // __JUCE_IIRFILTERAUDIOSOURCE_JUCEHEADER__
@@ -34147,8 +34160,6 @@ public:
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
- juce_UseDebuggingNewOperator
-
private:
Array inputs;
@@ -34158,8 +34169,7 @@ private:
double currentSampleRate;
int bufferSizeExpected;
- MixerAudioSource (const MixerAudioSource&);
- MixerAudioSource& operator= (const MixerAudioSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MixerAudioSource);
};
#endif // __JUCE_MIXERAUDIOSOURCE_JUCEHEADER__
@@ -34208,16 +34218,13 @@ public:
/** Implementation of the AudioSource method. */
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill);
- juce_UseDebuggingNewOperator
-
private:
double frequency, sampleRate;
double currentPhase, phasePerSample;
float amplitude;
- ToneGeneratorAudioSource (const ToneGeneratorAudioSource&);
- ToneGeneratorAudioSource& operator= (const ToneGeneratorAudioSource&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ToneGeneratorAudioSource);
};
#endif // __JUCE_TONEGENERATORAUDIOSOURCE_JUCEHEADER__
@@ -35194,9 +35201,8 @@ public:
*/
static const String getControllerName (int controllerNumber);
- juce_UseDebuggingNewOperator
-
private:
+
double timeStamp;
uint8* data;
int size;
@@ -35347,17 +35353,16 @@ public:
*/
virtual void stop();
- juce_UseDebuggingNewOperator
-
protected:
+
String name;
void* internal;
explicit MidiInput (const String& name);
private:
- MidiInput (const MidiInput&);
- MidiInput& operator= (const MidiInput&);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiInput);
};
#endif // __JUCE_MIDIINPUT_JUCEHEADER__
@@ -35551,9 +35556,8 @@ public:
int& numBytesOfMidiData,
int& samplePosition) throw();
- juce_UseDebuggingNewOperator
-
private:
+
const MidiBuffer& buffer;
const uint8* data;
@@ -35561,9 +35565,8 @@ public:
Iterator& operator= (const Iterator&);
};
- juce_UseDebuggingNewOperator
-
private:
+
friend class MidiBuffer::Iterator;
MemoryBlock data;
int bytesUsed;
@@ -35573,6 +35576,8 @@ private:
static int getEventTime (const void* d) throw();
static uint16 getEventDataSize (const void* d) throw();
static uint16 getEventTotalSize (const void* d) throw();
+
+ JUCE_LEAK_DETECTOR (MidiBuffer);
};
#endif // __JUCE_MIDIBUFFER_JUCEHEADER__
@@ -35687,9 +35692,8 @@ public:
*/
virtual void stopBackgroundThread();
- juce_UseDebuggingNewOperator
-
protected:
+
void* internal;
struct PendingMessage
@@ -35698,8 +35702,6 @@ protected:
MidiMessage message;
PendingMessage* next;
-
- juce_UseDebuggingNewOperator
};
CriticalSection lock;
@@ -35709,8 +35711,7 @@ protected:
void run();
private:
- MidiOutput (const MidiOutput&);
- MidiOutput& operator= (const MidiOutput&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiOutput);
};
#endif // __JUCE_MIDIOUTPUT_JUCEHEADER__
@@ -35794,13 +35795,16 @@ public:
/** Destructor. */
virtual ~SettableTooltipClient() {}
+ /** Assigns a new tooltip to this object. */
virtual void setTooltip (const String& newTooltip) { tooltipString = newTooltip; }
+ /** Returns the tooltip assigned to this object. */
virtual const String getTooltip() { return tooltipString; }
- juce_UseDebuggingNewOperator
-
protected:
+ SettableTooltipClient() {}
+
+private:
String tooltipString;
};
@@ -35867,8 +35871,6 @@ public:
outlineColourId = 0x1001c10 /**< The colour to use to draw an outline around the tooltip. */
};
- juce_UseDebuggingNewOperator
-
private:
int millisecondsBeforeTipAppears;
@@ -35887,8 +35889,7 @@ private:
void showFor (const String& tip);
void hide();
- TooltipWindow (const TooltipWindow&);
- TooltipWindow& operator= (const TooltipWindow&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TooltipWindow);
};
#endif // __JUCE_TOOLTIPWINDOW_JUCEHEADER__
@@ -36223,8 +36224,6 @@ public:
*/
void setState (const ButtonState newState);
- juce_UseDebuggingNewOperator
-
protected:
/** This method is called when the button has been clicked.
@@ -36346,8 +36345,7 @@ private:
void sendClickMessage (const ModifierKeys& modifiers);
void sendStateMessage();
- Button (const Button&);
- Button& operator= (const Button&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Button);
};
/** This typedef is just for compatibility with old code - newer code should use Button::Listener instead. */
@@ -36630,8 +36628,6 @@ public:
/** @internal */
void resized();
- juce_UseDebuggingNewOperator
-
private:
Range totalRange, visibleRange;
@@ -36648,8 +36644,7 @@ private:
void updateThumbPosition();
void timerCallback();
- ScrollBar (const ScrollBar&);
- ScrollBar& operator= (const ScrollBar&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ScrollBar);
};
/** This typedef is just for compatibility with old code - newer code should use the ScrollBar::Listener class directly. */
@@ -36860,8 +36855,6 @@ public:
*/
ScrollBar* getHorizontalScrollBar() throw() { return &horizontalScrollBar; }
- juce_UseDebuggingNewOperator
-
/** @internal */
void resized();
/** @internal */
@@ -36876,6 +36869,7 @@ public:
bool useMouseWheelMoveIfNeeded (const MouseEvent& e, float wheelIncrementX, float wheelIncrementY);
private:
+
Component::SafePointer contentComp;
Rectangle lastVisibleArea;
int scrollBarThickness;
@@ -36888,8 +36882,7 @@ private:
void updateVisibleArea();
void deleteContentComp();
- Viewport (const Viewport&);
- Viewport& operator= (const Viewport&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Viewport);
};
#endif // __JUCE_VIEWPORT_JUCEHEADER__
@@ -37231,19 +37224,16 @@ public:
Image customImage;
ApplicationCommandManager* commandManager;
- juce_UseDebuggingNewOperator
-
private:
+
const PopupMenu& menu;
int index;
- MenuItemIterator (const MenuItemIterator&);
- MenuItemIterator& operator= (const MenuItemIterator&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MenuItemIterator);
};
- juce_UseDebuggingNewOperator
-
private:
+
class Item;
class ItemComponent;
class Window;
@@ -37266,6 +37256,8 @@ private:
int showMenu (const Rectangle& target, int itemIdThatMustBeVisible,
int minimumWidth, int maximumNumColumns, int standardItemHeight,
Component* componentAttachedTo, ModalComponentManager::Callback* callback);
+
+ JUCE_LEAK_DETECTOR (PopupMenu);
};
#endif // __JUCE_POPUPMENU_JUCEHEADER__
@@ -37836,8 +37828,6 @@ public:
*/
virtual void performPopupMenuAction (int menuItemID);
- juce_UseDebuggingNewOperator
-
protected:
/** Scrolls the minimum distance needed to get the caret into view. */
@@ -37946,8 +37936,7 @@ private:
void repaintText (const Range& range);
UndoManager* getUndoManager() throw();
- TextEditor (const TextEditor&);
- TextEditor& operator= (const TextEditor&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TextEditor);
};
/** This typedef is just for compatibility with old code - newer code should use the TextEditor::Listener class directly. */
@@ -38177,9 +38166,8 @@ public:
/** Returns true if the editor is currently focused and active. */
bool isBeingEdited() const throw();
- juce_UseDebuggingNewOperator
-
protected:
+
/** Creates the TextEditor component that will be used when the user has clicked on the label.
Subclasses can override this if they need to customise this component in some way.
*/
@@ -38233,6 +38221,7 @@ protected:
void valueChanged (Value&);
private:
+
Value textValue;
String lastTextValue;
Font font;
@@ -38250,8 +38239,7 @@ private:
bool updateFromTextEditorContents();
void callChangeListeners();
- Label (const Label&);
- Label& operator= (const Label&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Label);
};
/** This typedef is just for compatibility with old code - newer code should use the Label::Listener class directly. */
@@ -38592,9 +38580,8 @@ public:
/** @internal */
void valueChanged (Value&);
- juce_UseDebuggingNewOperator
-
private:
+
struct ItemInfo
{
String name;
@@ -38619,8 +38606,7 @@ private:
ItemInfo* getItemForId (int itemId) const throw();
ItemInfo* getItemForIndex (int index) const throw();
- ComboBox (const ComboBox&);
- ComboBox& operator= (const ComboBox&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComboBox);
};
/** This typedef is just for compatibility with old code - newer code should use the ComboBox::Listener class directly. */
@@ -39027,8 +39013,6 @@ public:
*/
CriticalSection& getMidiCallbackLock() throw() { return midiCallbackLock; }
- juce_UseDebuggingNewOperator
-
private:
OwnedArray availableDeviceTypes;
@@ -39106,8 +39090,7 @@ private:
AudioIODeviceType* findType (const String& inputName, const String& outputName);
- AudioDeviceManager (const AudioDeviceManager&);
- AudioDeviceManager& operator= (const AudioDeviceManager&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDeviceManager);
};
#endif // __JUCE_AUDIODEVICEMANAGER_JUCEHEADER__
@@ -39202,11 +39185,11 @@ public:
*/
MidiEventHolder* noteOffObject;
- juce_UseDebuggingNewOperator
-
private:
+
friend class MidiMessageSequence;
MidiEventHolder (const MidiMessage& message);
+ JUCE_LEAK_DETECTOR (MidiEventHolder);
};
/** Clears the sequence. */
@@ -39375,8 +39358,6 @@ public:
/** Swaps this sequence with another one. */
void swapWith (MidiMessageSequence& other) throw();
- juce_UseDebuggingNewOperator
-
/** @internal */
static int compareElements (const MidiMessageSequence::MidiEventHolder* first,
const MidiMessageSequence::MidiEventHolder* second) throw();
@@ -39387,6 +39368,8 @@ private:
OwnedArray list;
void sort();
+
+ JUCE_LEAK_DETECTOR (MidiMessageSequence);
};
#endif // __JUCE_MIDIMESSAGESEQUENCE_JUCEHEADER__
@@ -39530,17 +39513,15 @@ public:
*/
void convertTimestampTicksToSeconds();
- juce_UseDebuggingNewOperator
-
private:
+
OwnedArray tracks;
short timeFormat;
- MidiFile (const MidiFile&);
- MidiFile& operator= (const MidiFile&);
-
void readNextTrack (const uint8* data, int size);
void writeTrack (OutputStream& mainOut, int trackNum);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiFile);
};
#endif // __JUCE_MIDIFILE_JUCEHEADER__
@@ -39711,9 +39692,8 @@ public:
*/
void removeListener (MidiKeyboardStateListener* listener);
- juce_UseDebuggingNewOperator
-
private:
+
CriticalSection lock;
uint16 noteStates [128];
MidiBuffer eventsToAdd;
@@ -39722,8 +39702,7 @@ private:
void noteOnInternal (int midiChannel, int midiNoteNumber, float velocity);
void noteOffInternal (int midiChannel, int midiNoteNumber);
- MidiKeyboardState (const MidiKeyboardState&);
- MidiKeyboardState& operator= (const MidiKeyboardState&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiKeyboardState);
};
#endif // __JUCE_MIDIKEYBOARDSTATE_JUCEHEADER__
@@ -39798,16 +39777,14 @@ public:
/** @internal */
void handleIncomingMidiMessage (MidiInput* source, const MidiMessage& message);
- juce_UseDebuggingNewOperator
-
private:
+
double lastCallbackTime;
CriticalSection midiCallbackLock;
MidiBuffer incomingMessages;
double sampleRate;
- MidiMessageCollector (const MidiMessageCollector&);
- MidiMessageCollector& operator= (const MidiMessageCollector&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiMessageCollector);
};
#endif // __JUCE_MIDIMESSAGECOLLECTOR_JUCEHEADER__
@@ -40560,8 +40537,6 @@ public:
double sampleRate,
int blockSize) throw();
- juce_UseDebuggingNewOperator
-
protected:
/** Helper function that just converts an xml element into a binary blob.
@@ -40600,8 +40575,7 @@ private:
BigInteger changingParams;
#endif
- AudioProcessor (const AudioProcessor&);
- AudioProcessor& operator= (const AudioProcessor&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioProcessor);
};
#endif // __JUCE_AUDIOPROCESSOR_JUCEHEADER__
@@ -40714,7 +40688,9 @@ public:
*/
bool loadFromXml (const XmlElement& xml);
- juce_UseDebuggingNewOperator
+private:
+
+ JUCE_LEAK_DETECTOR (PluginDescription);
};
#endif // __JUCE_PLUGINDESCRIPTION_JUCEHEADER__
@@ -40750,13 +40726,11 @@ public:
*/
virtual void* getPlatformSpecificData();
- juce_UseDebuggingNewOperator
-
protected:
+
AudioPluginInstance();
- AudioPluginInstance (const AudioPluginInstance&);
- AudioPluginInstance& operator= (const AudioPluginInstance&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginInstance);
};
#endif // __JUCE_AUDIOPLUGININSTANCE_JUCEHEADER__
@@ -40835,13 +40809,11 @@ public:
*/
virtual const FileSearchPath getDefaultLocationsToSearch() = 0;
- juce_UseDebuggingNewOperator
-
protected:
+
AudioPluginFormat() throw();
- AudioPluginFormat (const AudioPluginFormat&);
- AudioPluginFormat& operator= (const AudioPluginFormat&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginFormat);
};
#endif // __JUCE_AUDIOPLUGINFORMAT_JUCEHEADER__
@@ -40868,11 +40840,9 @@ public:
bool doesPluginStillExist (const PluginDescription& desc);
const FileSearchPath getDefaultLocationsToSearch();
- juce_UseDebuggingNewOperator
-
private:
- AudioUnitPluginFormat (const AudioUnitPluginFormat&);
- AudioUnitPluginFormat& operator= (const AudioUnitPluginFormat&);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioUnitPluginFormat);
};
#endif
@@ -40909,11 +40879,8 @@ public:
const String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { return fileOrIdentifier; }
const FileSearchPath getDefaultLocationsToSearch();
- juce_UseDebuggingNewOperator
-
private:
- DirectXPluginFormat (const DirectXPluginFormat&);
- DirectXPluginFormat& operator= (const DirectXPluginFormat&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DirectXPluginFormat);
};
#endif
@@ -40950,11 +40917,8 @@ public:
const String getNameOfPluginFromIdentifier (const String& fileOrIdentifier) { return fileOrIdentifier; }
const FileSearchPath getDefaultLocationsToSearch();
- juce_UseDebuggingNewOperator
-
private:
- LADSPAPluginFormat (const LADSPAPluginFormat&);
- LADSPAPluginFormat& operator= (const LADSPAPluginFormat&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LADSPAPluginFormat);
};
#endif
@@ -41154,13 +41118,11 @@ public:
bool doesPluginStillExist (const PluginDescription& desc);
const FileSearchPath getDefaultLocationsToSearch();
- juce_UseDebuggingNewOperator
-
private:
- VSTPluginFormat (const VSTPluginFormat&);
- VSTPluginFormat& operator= (const VSTPluginFormat&);
void recursiveFileSearch (StringArray& results, const File& dir, const bool recursive);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (VSTPluginFormat);
};
#endif
@@ -41233,13 +41195,11 @@ public:
*/
bool doesPluginStillExist (const PluginDescription& description) const;
- juce_UseDebuggingNewOperator
-
private:
+
OwnedArray formats;
- AudioPluginFormatManager (const AudioPluginFormatManager&);
- AudioPluginFormatManager& operator= (const AudioPluginFormatManager&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginFormatManager);
};
#endif // __JUCE_AUDIOPLUGINFORMATMANAGER_JUCEHEADER__
@@ -41374,13 +41334,11 @@ public:
*/
void recreateFromXml (const XmlElement& xml);
- juce_UseDebuggingNewOperator
-
private:
+
OwnedArray types;
- KnownPluginList (const KnownPluginList&);
- KnownPluginList& operator= (const KnownPluginList&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KnownPluginList);
};
#endif // __JUCE_KNOWNPLUGINLIST_JUCEHEADER__
@@ -41470,9 +41428,8 @@ public:
*/
const StringArray& getFailedFiles() const throw() { return failedFiles; }
- juce_UseDebuggingNewOperator
-
private:
+
KnownPluginList& list;
AudioPluginFormat& format;
StringArray filesOrIdentifiersToScan;
@@ -41484,8 +41441,7 @@ private:
const StringArray getDeadMansPedalFile();
void setDeadMansPedalFile (const StringArray& newContents);
- PluginDirectoryScanner (const PluginDirectoryScanner&);
- PluginDirectoryScanner& operator= (const PluginDirectoryScanner&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginDirectoryScanner);
};
#endif // __JUCE_PLUGINDIRECTORYSCANNER_JUCEHEADER__
@@ -42021,8 +41977,6 @@ public:
/** @internal */
void startDragAndDrop (const MouseEvent& e, const String& dragDescription);
- juce_UseDebuggingNewOperator
-
private:
friend class ListViewport;
@@ -42041,8 +41995,7 @@ private:
bool deselectOthersFirst,
bool isMouseClick);
- ListBox (const ListBox&);
- ListBox& operator= (const ListBox&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ListBox);
};
#endif // __JUCE_LISTBOX_JUCEHEADER__
@@ -42110,8 +42063,6 @@ public:
*/
virtual const Font getFont();
- juce_UseDebuggingNewOperator
-
protected:
/** @internal */
void paintButton (Graphics& g, bool isMouseOverButton, bool isButtonDown);
@@ -42119,8 +42070,8 @@ protected:
void colourChanged();
private:
- TextButton (const TextButton&);
- TextButton& operator= (const TextButton&);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TextButton);
};
#endif // __JUCE_TEXTBUTTON_JUCEHEADER__
@@ -42171,9 +42122,8 @@ public:
/** @internal */
void timerCallback();
- juce_UseDebuggingNewOperator
-
private:
+
KnownPluginList& list;
File deadMansPedalFile;
ListBox listBox;
@@ -42183,8 +42133,7 @@ private:
void scanFor (AudioPluginFormat* format);
- PluginListComponent (const PluginListComponent&);
- PluginListComponent& operator= (const PluginListComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginListComponent);
};
#endif // __JUCE_PLUGINLISTCOMPONENT_JUCEHEADER__
@@ -42267,9 +42216,8 @@ public:
*/
typedef ReferenceCountedObjectPtr Ptr;
- juce_UseDebuggingNewOperator
-
private:
+
friend class AudioProcessorGraph;
const ScopedPointer processor;
@@ -42280,8 +42228,7 @@ public:
void prepare (double sampleRate, int blockSize, AudioProcessorGraph* graph);
void unprepare();
- Node (const Node&);
- Node& operator= (const Node&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Node);
};
/** Represents a connection between two channels of two nodes in an AudioProcessorGraph.
@@ -42320,9 +42267,9 @@ public:
*/
int destChannelIndex;
- juce_UseDebuggingNewOperator
-
private:
+
+ JUCE_LEAK_DETECTOR (Connection);
};
/** Deletes all nodes and connections from this graph.
@@ -42516,14 +42463,11 @@ public:
/** @internal */
void setParentGraph (AudioProcessorGraph* graph);
- juce_UseDebuggingNewOperator
-
private:
const IODeviceType type;
AudioProcessorGraph* graph;
- AudioGraphIOProcessor (const AudioGraphIOProcessor&);
- AudioGraphIOProcessor& operator= (const AudioGraphIOProcessor&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioGraphIOProcessor);
};
// AudioProcessor methods:
@@ -42563,9 +42507,8 @@ public:
/** @internal */
void handleAsyncUpdate();
- juce_UseDebuggingNewOperator
-
private:
+
ReferenceCountedArray nodes;
OwnedArray connections;
int lastNodeId;
@@ -42586,8 +42529,7 @@ private:
bool isAnInputTo (uint32 possibleInputId, uint32 possibleDestinationId, int recursionCheck) const;
- AudioProcessorGraph (const AudioProcessorGraph&);
- AudioProcessorGraph& operator= (const AudioProcessorGraph&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioProcessorGraph);
};
#endif // __JUCE_AUDIOPROCESSORGRAPH_JUCEHEADER__
@@ -42657,9 +42599,8 @@ public:
/** @internal */
void handleIncomingMidiMessage (MidiInput* source, const MidiMessage& message);
- juce_UseDebuggingNewOperator
-
private:
+
AudioProcessor* processor;
CriticalSection lock;
double sampleRate;
@@ -42673,8 +42614,7 @@ private:
MidiBuffer incomingMidi;
MidiMessageCollector messageCollector;
- AudioProcessorPlayer (const AudioProcessorPlayer&);
- AudioProcessorPlayer& operator= (const AudioProcessorPlayer&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioProcessorPlayer);
};
#endif // __JUCE_AUDIOPROCESSORPLAYER_JUCEHEADER__
@@ -42772,15 +42712,16 @@ public:
/** By default, this just repaints the component. */
void enablementChanged();
- juce_UseDebuggingNewOperator
-
protected:
/** Used by the PropertyPanel to determine how high this component needs to be.
-
A subclass can update this value in its constructor but shouldn't alter it later
as changes won't necessarily be picked up.
*/
int preferredHeight;
+
+private:
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PropertyComponent);
};
#endif // __JUCE_PROPERTYCOMPONENT_JUCEHEADER__
@@ -42898,8 +42839,6 @@ public:
/** @internal */
void resized();
- juce_UseDebuggingNewOperator
-
private:
Viewport viewport;
class PropertyHolderComponent;
@@ -42908,6 +42847,8 @@ private:
void updatePropHolderLayout() const;
void updatePropHolderLayout (int width) const;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PropertyPanel);
};
#endif // __JUCE_PROPERTYPANEL_JUCEHEADER__
@@ -42932,13 +42873,11 @@ public:
void paint (Graphics& g);
void resized();
- juce_UseDebuggingNewOperator
-
private:
+
PropertyPanel panel;
- GenericAudioProcessorEditor (const GenericAudioProcessorEditor&);
- GenericAudioProcessorEditor& operator= (const GenericAudioProcessorEditor&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GenericAudioProcessorEditor);
};
#endif // __JUCE_GENERICAUDIOPROCESSOREDITOR_JUCEHEADER__
@@ -42997,7 +42936,9 @@ public:
*/
typedef ReferenceCountedObjectPtr Ptr;
- juce_UseDebuggingNewOperator
+private:
+
+ JUCE_LEAK_DETECTOR (SynthesiserSound);
};
/**
@@ -43114,8 +43055,6 @@ public:
*/
void setCurrentPlaybackSampleRate (double newRate);
- juce_UseDebuggingNewOperator
-
protected:
/** Returns the current target sample rate at which rendering is being done.
@@ -43146,6 +43085,8 @@ private:
int currentlyPlayingNote;
uint32 noteOnTime;
SynthesiserSound::Ptr currentlyPlayingSound;
+
+ JUCE_LEAK_DETECTOR (SynthesiserVoice);
};
/**
@@ -43338,8 +43279,6 @@ public:
int startSample,
int numSamples);
- juce_UseDebuggingNewOperator
-
protected:
/** This is used to control access to the rendering callback and the note trigger methods. */
@@ -43382,8 +43321,7 @@ private:
uint32 lastNoteOnCounter;
bool shouldStealNotes;
- Synthesiser (const Synthesiser&);
- Synthesiser& operator= (const Synthesiser&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Synthesiser);
};
#endif // __JUCE_SYNTHESISER_JUCEHEADER__
@@ -43444,9 +43382,8 @@ public:
bool appliesToNote (const int midiNoteNumber);
bool appliesToChannel (const int midiChannel);
- juce_UseDebuggingNewOperator
-
private:
+
friend class SamplerVoice;
String name;
@@ -43455,6 +43392,8 @@ private:
BigInteger midiNotes;
int length, attackSamples, releaseSamples;
int midiRootNote;
+
+ JUCE_LEAK_DETECTOR (SamplerSound);
};
/**
@@ -43491,13 +43430,14 @@ public:
void renderNextBlock (AudioSampleBuffer& outputBuffer, int startSample, int numSamples);
- juce_UseDebuggingNewOperator
-
private:
+
double pitchRatio;
double sourceSamplePosition;
float lgain, rgain, attackReleaseLevel, attackDelta, releaseDelta;
bool isInAttack, isInRelease;
+
+ JUCE_LEAK_DETECTOR (SamplerVoice);
};
#endif // __JUCE_SAMPLER_JUCEHEADER__
@@ -43629,11 +43569,9 @@ public:
*/
void post();
- juce_UseDebuggingNewOperator
-
private:
- CallbackMessage (const CallbackMessage&);
- CallbackMessage& operator= (const CallbackMessage&);
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CallbackMessage);
};
#endif // __JUCE_CALLBACKMESSAGE_JUCEHEADER__
@@ -43798,9 +43736,8 @@ public:
*/
virtual void messageReceived (const MemoryBlock& message) = 0;
- juce_UseDebuggingNewOperator
-
private:
+
CriticalSection pipeAndSocketLock;
ScopedPointer socket;
ScopedPointer pipe;
@@ -43823,8 +43760,7 @@ private:
bool readNextMessageInt();
void run();
- InterprocessConnection (const InterprocessConnection&);
- InterprocessConnection& operator= (const InterprocessConnection&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InterprocessConnection);
};
#endif // __JUCE_INTERPROCESSCONNECTION_JUCEHEADER__
@@ -43889,17 +43825,13 @@ protected:
*/
virtual InterprocessConnection* createConnectionObject() = 0;
-public:
-
- juce_UseDebuggingNewOperator
-
private:
+
ScopedPointer socket;
void run();
- InterprocessConnectionServer (const InterprocessConnectionServer&);
- InterprocessConnectionServer& operator= (const InterprocessConnectionServer&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InterprocessConnectionServer);
};
#endif // __JUCE_INTERPROCESSCONNECTIONSERVER_JUCEHEADER__
@@ -44043,9 +43975,8 @@ public:
/** @internal */
~MessageManager() throw();
- juce_UseDebuggingNewOperator
-
private:
+
MessageManager() throw();
friend class MessageListener;
@@ -44072,8 +44003,7 @@ private:
Thread::ThreadID volatile threadWithLock;
CriticalSection lockingLock;
- MessageManager (const MessageManager&);
- MessageManager& operator= (const MessageManager&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MessageManager);
};
/** Used to make sure that the calling thread has exclusive access to the message loop.
@@ -44357,11 +44287,12 @@ public:
/** @internal */
void applyEffect (Image& sourceImage, Graphics& destContext, float alpha);
- juce_UseDebuggingNewOperator
-
private:
+
int offsetX, offsetY;
float radius, opacity;
+
+ JUCE_LEAK_DETECTOR (DropShadowEffect);
};
#endif // __JUCE_DROPSHADOWEFFECT_JUCEHEADER__
@@ -44390,9 +44321,8 @@ public:
/** Destructor. */
~ArrowButton();
- juce_UseDebuggingNewOperator
-
protected:
+
/** @internal */
void paintButton (Graphics& g,
bool isMouseOverButton,
@@ -44408,8 +44338,7 @@ private:
Path path;
int offset;
- ArrowButton (const ArrowButton&);
- ArrowButton& operator= (const ArrowButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ArrowButton);
};
#endif // __JUCE_ARROWBUTTON_JUCEHEADER__
@@ -45032,9 +44961,8 @@ public:
ValueTree state;
};
- juce_UseDebuggingNewOperator
-
protected:
+
friend class DrawableComposite;
friend class DrawableShape;
@@ -45054,8 +44982,7 @@ protected:
private:
void nonConstDraw (Graphics& g, float opacity, const AffineTransform& transform);
- Drawable (const Drawable&);
- Drawable& operator= (const Drawable&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Drawable);
};
#endif // __JUCE_DRAWABLE_JUCEHEADER__
@@ -45189,9 +45116,8 @@ public:
textColourId = 0x1004010, /**< The colour to use for the URL text. */
};
- juce_UseDebuggingNewOperator
-
protected:
+
/** @internal */
void paintButton (Graphics& g,
bool isMouseOverButton,
@@ -45210,8 +45136,7 @@ private:
Colour backgroundOff, backgroundOn;
int edgeIndent;
- DrawableButton (const DrawableButton&);
- DrawableButton& operator= (const DrawableButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DrawableButton);
};
#endif // __JUCE_DRAWABLEBUTTON_JUCEHEADER__
@@ -45281,9 +45206,8 @@ public:
*/
void changeWidthToFitText();
- juce_UseDebuggingNewOperator
-
protected:
+
/** @internal */
void clicked();
/** @internal */
@@ -45294,6 +45218,7 @@ protected:
bool isButtonDown);
private:
+
URL url;
Font font;
bool resizeFont;
@@ -45301,8 +45226,7 @@ private:
const Font getFontToUse() const;
- HyperlinkButton (const HyperlinkButton&);
- HyperlinkButton& operator= (const HyperlinkButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HyperlinkButton);
};
#endif // __JUCE_HYPERLINKBUTTON_JUCEHEADER__
@@ -45412,9 +45336,8 @@ public:
*/
const Image getDownImage() const;
- juce_UseDebuggingNewOperator
-
protected:
+
/** @internal */
bool hitTest (int x, int y);
/** @internal */
@@ -45433,8 +45356,7 @@ private:
const Image getCurrentImage() const;
- ImageButton (const ImageButton&);
- ImageButton& operator= (const ImageButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ImageButton);
};
#endif // __JUCE_IMAGEBUTTON_JUCEHEADER__
@@ -45503,8 +45425,6 @@ public:
void setOutline (const Colour& outlineColour,
float outlineStrokeWidth);
- juce_UseDebuggingNewOperator
-
protected:
/** @internal */
void paintButton (Graphics& g,
@@ -45512,14 +45432,14 @@ protected:
bool isButtonDown);
private:
+
Colour normalColour, overColour, downColour, outlineColour;
DropShadowEffect shadow;
Path shape;
bool maintainShapeProportions;
float outlineWidth;
- ShapeButton (const ShapeButton&);
- ShapeButton& operator= (const ShapeButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ShapeButton);
};
#endif // __JUCE_SHAPEBUTTON_JUCEHEADER__
@@ -45577,8 +45497,6 @@ public:
textColourId = 0x1006501 /**< The colour to use for the button's text. */
};
- juce_UseDebuggingNewOperator
-
protected:
/** @internal */
void paintButton (Graphics& g,
@@ -45590,8 +45508,7 @@ protected:
private:
- ToggleButton (const ToggleButton&);
- ToggleButton& operator= (const ToggleButton&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ToggleButton);
};
#endif // __JUCE_TOGGLEBUTTON_JUCEHEADER__
@@ -45851,8 +45768,6 @@ public:
*/
static bool performExternalDragDropOfText (const String& text);
- juce_UseDebuggingNewOperator
-
protected:
/** Override this if you want to be able to perform an external drag a set of files
when the user drags outside of this container component.
@@ -45875,9 +45790,12 @@ protected:
bool& canMoveFiles);
private:
+
friend class DragImageComponent;
ScopedPointer dragImageComponent;
String currentDragDesc;
+
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DragAndDropContainer);
};
#endif // __JUCE_DRAGANDDROPCONTAINER_JUCEHEADER__
@@ -46136,9 +46054,8 @@ public:
/** @internal */
static ToolbarItemComponent* createItem (ToolbarItemFactory&, int itemId);
- juce_UseDebuggingNewOperator
-
private:
+
ScopedPointer