Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Freeing form variable
#1
Question 
Hello,
in a IW form I create a TObjectList<T> in my CreateAndInit constructor.
The constructor call the inherited Create(AOwner) as its first instruction.
In the OnDestroy method I am freeing the TObjectList<T> calling TObjectList<T>.Free.
When I move from this form to another I call TIWAppForm(WebApplication.ActiveForm).Release and the destructor is executed in the right way.

The problem raises when I close the application cause it is shown an AV error which is not shown if I remove the freeing of the TObjectList<T> in the Destructor.

It seems the form is released another time when the application closes.

Any advice about  how to remove my form variable avoiding the AV error when the application closes?

Thank you,
Davide
Reply


Messages In This Thread
Freeing form variable - by David1 - 05-23-2022, 08:28 AM
RE: Freeing form variable - by Alexandre Machado - 05-27-2022, 12:48 AM
RE: Freeing form variable - by David1 - 05-31-2022, 02:27 PM
RE: Freeing form variable - by David1 - 06-01-2022, 08:18 AM
RE: Freeing form variable - by Alexandre Machado - 06-03-2022, 10:37 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)