If TextBox1 and Table1 are added at design time then this code leaves the controls visible when run from the optimising compiler. The IDE and legacy compile leaves them invisible as expected.
This code, adding the initial controls at runtime works fine in the optimising compiler.
B4X:
Sub App_Start
Form1.Show
Msgbox("1")
Table1.dispose
TextBox1.Dispose
AddTable("Form1","Table1",20,20,100,100)
AddTextBox("Form1","TextBox1",20,150,100,22,"")
Table1.Visible=false
TextBox1.Visible=false
End Sub
This code, adding the initial controls at runtime works fine in the optimising compiler.
B4X:
Sub App_Start
Form1.Show
AddTable("Form1","Table1",0,0,100,100)
AddTextBox("Form1","TextBox1",0,150,100,22,"")
Msgbox("1")
Table1.dispose
TextBox1.Dispose
AddTable("Form1","Table1",20,20,100,100)
AddTextBox("Form1","TextBox1",20,150,100,22,"")
Table1.Visible=false
TextBox1.Visible=false
End Sub