mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
Fix memory leak in BluetoothMidiSelectorOverlay
This commit is contained in:
parent
13c494666e
commit
edd828a554
1 changed files with 9 additions and 1 deletions
|
|
@ -73,12 +73,19 @@ public:
|
|||
setBounds (0, 0, getParentWidth(), getParentHeight());
|
||||
toFront (true);
|
||||
|
||||
nativeSelectorComponent.setView ([[[BluetoothSelectorView alloc] init] getView]);
|
||||
selectorView = [[BluetoothSelectorView alloc] init];
|
||||
nativeSelectorComponent.setView ([selectorView getView]);
|
||||
addAndMakeVisible (nativeSelectorComponent);
|
||||
|
||||
enterModalState (true, nullptr, true);
|
||||
}
|
||||
|
||||
~BluetoothMidiSelectorOverlay()
|
||||
{
|
||||
[selectorView release];
|
||||
}
|
||||
|
||||
|
||||
void paint (Graphics& g) override
|
||||
{
|
||||
g.fillAll (Colours::black.withAlpha (0.5f));
|
||||
|
|
@ -108,6 +115,7 @@ private:
|
|||
}
|
||||
|
||||
UIViewComponent nativeSelectorComponent;
|
||||
BluetoothSelectorView* selectorView;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BluetoothMidiSelectorOverlay)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue