Ver código fonte

fix memory leak

Johann 6 anos atrás
pai
commit
2458008025
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      bccombobox.pas

+ 2 - 2
bccombobox.pas

@@ -278,9 +278,9 @@ begin
   FButton.OnClick := ButtonClick;
   FButton.DropDownArrow := True;
 
-  FListBox := TListBox.Create(FForm);
+  FListBox := TListBox.Create(self);
   FListBox.Anchors := [akTop, akLeft, akRight, akBottom];
-  FListBox.Parent := FForm;
+  FListBox.Parent := nil;
   FListBox.BorderStyle:= bsNone;
   FListBox.OnSelectionChange := ListBoxSelectionChange;
   FListBox.OnMouseLeave:=ListBoxMouseLeave;