Topic: To do all classes by successors from TWinControl?
I as you know, not especially love OOP, but on the sly it is necessary to work with it.
Here, for example, I created the class.
type TMyObject=class (TObject) The designer there, all affairs... end;
In one of form methods I do
Vasya = TMyObject. Create (...);
And then anywhere I do not do clearing of this object.
Also what you think?
At program termination I catch an exception that Memory Leak!
Then, I do so
type TMyObject=class (TWinControl)
And at creation of object I specify that the owner of this object - one of "forms" of my application.
And - any memory leak, even thus that anywhere in the program I do not release this object.
Then the form itself cares of clearing of storage of all child objects?
Then why all created classes not to do by successors from TWinControl?
Time the form so well is able to care about the wines-control of wards.