Перейти к содержанию
Fire Monkey от А до Я

Лидеры

Популярный контент

Показан контент с высокой репутацией 02.10.2019 во всех областях

  1. krapotkin

    Уничтожить TLayout

    You shouldn't do it this way Follow the simple rules. 1. Create your components without Owner ==> Aaa := TAAA.Create(NIL); 2. Keep the links to created objects. Use them to destroy objects after. L:=TLayout.Create(NIL); L.parent := ContainerComponent; .... L.Parent := NIL; FreeAndNil(L); // now it works the same way in desktop and mobile !! 3. Don't call DisposeOf manually. ARC should do it for you automatically! If you didn't provide conditions for automatic destruction and killed the object yourself, it means that some links to your object are keeped somewhere inside and can be utilized at any moment, so you'll get an Access Violation... Good alternative to your scenario is using Frames! Construct the frame from several components and use it as single unit instead of creating Layout, then rectanlge inside it then ... then ...
    1 балл
Эта таблица лидеров рассчитана в Москва/GMT+03:00
×
×
  • Создать...