Home > Back-end >  Why the Delphi xe5 android dynamically created controls free not to drop
Why the Delphi xe5 android dynamically created controls free not to drop

Time:10-07

Such as: why Delphi xe5 android dynamically created controls free out
The code is as follows:
 
For I:=0 to do pageCount - 1
The begin
TbItem:=TTabItem. Create (nil);
TbItem. Parent:=tb02;
TbItem. Width:=tb02. Width;
TbItem. Text:='first' + IntToStr (I + 1) + 'pages';
Tb02. ActiveTab:=tb02. Tabs [0];
end;//create


For I:=tb02. Downto TabCount - 1 0 do
The begin
Tb02. Tabs [I]. Free;
end;//free

CodePudding user response:

After free, also exists in the interface

CodePudding user response:

Make up a missed lesson first, know the knowledge of Delphi Android development.
Mobile version of the Free code is invalid. The object is to use reference counting survival from management.
You can use the appropriate disposeOf forced to release, but also when forced to adopt.

CodePudding user response:

refer to the second floor wr960204 response:
make up a missed lesson first, know the knowledge of Delphi Android development.
Mobile version of the Free code is invalid. The object is to use reference counting survival from management.
You can use the appropriate disposeOf forced to release, but is also used when forced to.

Excuse me, where there is this information, can also be in English and online for a long time, the information on Delphi android development is too little, are all the same

CodePudding user response:

reference dodocc2012 reply: 3/f
Quote: refer to the second floor wr960204 response:

Make up a missed lesson first, know the knowledge of Delphi Android development.
Mobile version of the Free code is invalid. The object is to use reference counting survival from management.
You can use the appropriate disposeOf forced to release, but is also used when forced to.

Excuse me, where there is this information, can also be in English and online for a long time, the information on Delphi android development is too little, are all the same

Do we have data?
Go to online documentation, a concept first. Have a problem can also see FireMonkey source code
  • Related