diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 5a55825947..e47f42e9d4 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -51028,7 +51028,7 @@ TableListBox::TableListBox (const String& name, TableListBoxModel* const model_) TableListBox::~TableListBox() { - deleteAllChildren(); + header = 0; } void TableListBox::setModel (TableListBoxModel* const newModel) @@ -57924,7 +57924,6 @@ FileListComponent::FileListComponent (DirectoryContentsList& listToShow) FileListComponent::~FileListComponent() { fileList.removeChangeListener (this); - deleteAllChildren(); } int FileListComponent::getNumSelectedFiles() const @@ -73267,13 +73266,12 @@ public: lastHue (0.0f), edge (edgeSize) { - addAndMakeVisible (marker = new ColourSpaceMarker()); + addAndMakeVisible (&marker); setMouseCursor (MouseCursor::CrosshairCursor); } ~ColourSpaceView() { - deleteAllChildren(); } void paint (Graphics& g) @@ -73341,15 +73339,15 @@ private: float& s; float& v; float lastHue; - ColourSpaceMarker* marker; + ColourSpaceMarker marker; const int edge; Image colours; - void updateMarker() const + void updateMarker() { - marker->setBounds (roundToInt ((getWidth() - edge * 2) * s), - roundToInt ((getHeight() - edge * 2) * (1.0f - v)), - edge * 2, edge * 2); + marker.setBounds (roundToInt ((getWidth() - edge * 2) * s), + roundToInt ((getHeight() - edge * 2) * (1.0f - v)), + edge * 2, edge * 2); } ColourSpaceView (const ColourSpaceView&); @@ -73402,12 +73400,11 @@ public: lastHue (0.0f), edge (edgeSize) { - addAndMakeVisible (marker = new HueSelectorMarker()); + addAndMakeVisible (&marker); } ~HueSelectorComp() { - deleteAllChildren(); } void paint (Graphics& g) @@ -73425,8 +73422,8 @@ public: void resized() { - marker->setBounds (0, roundToInt ((getHeight() - edge * 2) * h), - getWidth(), edge * 2); + marker.setBounds (0, roundToInt ((getHeight() - edge * 2) * h), + getWidth(), edge * 2); } void mouseDown (const MouseEvent& e) @@ -73452,7 +73449,7 @@ private: float& s; float& v; float lastHue; - HueSelectorMarker* marker; + HueSelectorMarker marker; const int edge; HueSelectorComp (const HueSelectorComp&); @@ -73517,6 +73514,8 @@ ColourSelector::ColourSelector (const int flags_, const int edgeGap_, const int gapAroundColourSpaceComponent) : colour (Colours::white), + colourSpace (0), + hueSelector (0), flags (flags_), topSpace (0), edgeGap (edgeGap_) @@ -73548,11 +73547,6 @@ ColourSelector::ColourSelector (const int flags_, addAndMakeVisible (colourSpace = new ColourSpaceView (this, h, s, v, gapAroundColourSpaceComponent)); addAndMakeVisible (hueSelector = new HueSelectorComp (this, h, s, v, gapAroundColourSpaceComponent)); } - else - { - colourSpace = 0; - hueSelector = 0; - } update(); } diff --git a/juce_amalgamated.h b/juce_amalgamated.h index 6fa97f54ce..2526822e06 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -64,7 +64,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 52 -#define JUCE_BUILDNUMBER 27 +#define JUCE_BUILDNUMBER 28 /** Current Juce version number. diff --git a/src/core/juce_StandardHeader.h b/src/core/juce_StandardHeader.h index cdc20f9327..db822b8735 100644 --- a/src/core/juce_StandardHeader.h +++ b/src/core/juce_StandardHeader.h @@ -33,7 +33,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 52 -#define JUCE_BUILDNUMBER 27 +#define JUCE_BUILDNUMBER 28 /** Current Juce version number. diff --git a/src/gui/components/controls/juce_TableListBox.cpp b/src/gui/components/controls/juce_TableListBox.cpp index 834091d34f..91b744173f 100644 --- a/src/gui/components/controls/juce_TableListBox.cpp +++ b/src/gui/components/controls/juce_TableListBox.cpp @@ -330,7 +330,7 @@ TableListBox::TableListBox (const String& name, TableListBoxModel* const model_) TableListBox::~TableListBox() { - deleteAllChildren(); + header = 0; } void TableListBox::setModel (TableListBoxModel* const newModel) diff --git a/src/gui/components/filebrowser/juce_FileListComponent.cpp b/src/gui/components/filebrowser/juce_FileListComponent.cpp index 47a9209589..7b24202192 100644 --- a/src/gui/components/filebrowser/juce_FileListComponent.cpp +++ b/src/gui/components/filebrowser/juce_FileListComponent.cpp @@ -47,7 +47,6 @@ FileListComponent::FileListComponent (DirectoryContentsList& listToShow) FileListComponent::~FileListComponent() { fileList.removeChangeListener (this); - deleteAllChildren(); } int FileListComponent::getNumSelectedFiles() const diff --git a/src/gui/components/special/juce_ColourSelector.cpp b/src/gui/components/special/juce_ColourSelector.cpp index 155574a2b2..fa60c067f1 100644 --- a/src/gui/components/special/juce_ColourSelector.cpp +++ b/src/gui/components/special/juce_ColourSelector.cpp @@ -101,13 +101,12 @@ public: lastHue (0.0f), edge (edgeSize) { - addAndMakeVisible (marker = new ColourSpaceMarker()); + addAndMakeVisible (&marker); setMouseCursor (MouseCursor::CrosshairCursor); } ~ColourSpaceView() { - deleteAllChildren(); } void paint (Graphics& g) @@ -175,15 +174,15 @@ private: float& s; float& v; float lastHue; - ColourSpaceMarker* marker; + ColourSpaceMarker marker; const int edge; Image colours; - void updateMarker() const + void updateMarker() { - marker->setBounds (roundToInt ((getWidth() - edge * 2) * s), - roundToInt ((getHeight() - edge * 2) * (1.0f - v)), - edge * 2, edge * 2); + marker.setBounds (roundToInt ((getWidth() - edge * 2) * s), + roundToInt ((getHeight() - edge * 2) * (1.0f - v)), + edge * 2, edge * 2); } ColourSpaceView (const ColourSpaceView&); @@ -238,12 +237,11 @@ public: lastHue (0.0f), edge (edgeSize) { - addAndMakeVisible (marker = new HueSelectorMarker()); + addAndMakeVisible (&marker); } ~HueSelectorComp() { - deleteAllChildren(); } void paint (Graphics& g) @@ -261,8 +259,8 @@ public: void resized() { - marker->setBounds (0, roundToInt ((getHeight() - edge * 2) * h), - getWidth(), edge * 2); + marker.setBounds (0, roundToInt ((getHeight() - edge * 2) * h), + getWidth(), edge * 2); } void mouseDown (const MouseEvent& e) @@ -288,7 +286,7 @@ private: float& s; float& v; float lastHue; - HueSelectorMarker* marker; + HueSelectorMarker marker; const int edge; HueSelectorComp (const HueSelectorComp&); @@ -355,6 +353,8 @@ ColourSelector::ColourSelector (const int flags_, const int edgeGap_, const int gapAroundColourSpaceComponent) : colour (Colours::white), + colourSpace (0), + hueSelector (0), flags (flags_), topSpace (0), edgeGap (edgeGap_) @@ -386,11 +386,6 @@ ColourSelector::ColourSelector (const int flags_, addAndMakeVisible (colourSpace = new ColourSpaceView (this, h, s, v, gapAroundColourSpaceComponent)); addAndMakeVisible (hueSelector = new HueSelectorComp (this, h, s, v, gapAroundColourSpaceComponent)); } - else - { - colourSpace = 0; - hueSelector = 0; - } update(); }