Fixed leaking issues with the previous commit.
This commit is contained in:
parent
157a312e8a
commit
dda58c9323
|
@ -408,15 +408,13 @@ struct uiForm {
|
|||
uiDarwinControlSetHuggingPriority(uiDarwinControl(fc.c), fc.oldHorzHuggingPri, NSLayoutConstraintOrientationHorizontal);
|
||||
uiDarwinControlSetHuggingPriority(uiDarwinControl(fc.c), fc.oldVertHuggingPri, NSLayoutConstraintOrientationVertical);
|
||||
|
||||
[fc.label removeFromSuperview];
|
||||
|
||||
[fc onDestroy];
|
||||
[self->children removeObjectAtIndex:n];
|
||||
|
||||
[self establishOurConstraints];
|
||||
if (stretchy) {
|
||||
if (stretchy)
|
||||
if ([self nStretchy] == 0)
|
||||
uiDarwinNotifyEdgeHuggingChanged(uiDarwinControl(self->f));
|
||||
}
|
||||
}
|
||||
|
||||
- (int)isPadded
|
||||
|
|
|
@ -278,11 +278,12 @@ void uiFormAppend(uiForm *f, const char *label, uiControl *c, int stretchy)
|
|||
|
||||
void uiFormDelete(uiForm *f, int index)
|
||||
{
|
||||
uiControl *c;
|
||||
struct formChild fc;
|
||||
|
||||
c = (*(f->controls))[index].c;
|
||||
uiControlSetParent(c, NULL);
|
||||
uiWindowsControlSetParentHWND(uiWindowsControl(c), NULL);
|
||||
fc = (*(f->controls))[index];
|
||||
uiControlSetParent(fc.c, NULL);
|
||||
uiWindowsControlSetParentHWND(uiWindowsControl(fc.c), NULL);
|
||||
uiWindowsEnsureDestroyWindow(fc.label);
|
||||
f->controls->erase(f->controls->begin() + index);
|
||||
formArrangeChildren(f);
|
||||
uiWindowsControlMinimumSizeChanged(uiWindowsControl(f));
|
||||
|
|
Loading…
Reference in New Issue