Fixed leaking issues with the previous commit.

This commit is contained in:
Pietro Gagliardi 2016-06-15 12:04:11 -04:00
parent 157a312e8a
commit dda58c9323
2 changed files with 7 additions and 8 deletions

View File

@ -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

View File

@ -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));