But with inheritance there can be more than one destructor. In the following code type B contains and runs two destructors.Only one destructor may be declared and defined per type.
Code: Select all
Type test
As Integer x
Declare Destructor
End Type
Destructor test()
?"base destructor"
End Destructor
Type b Extends test
Declare Destructor
End Type
Destructor b()
'
? "another destructor"
End Destructor
Scope
Dim As b btest
End Scope
Sleep
Do you think that statement needs clarification?
Proposed clarification:
And then perhaps add another example to show this behavior.Only one destructor may be declared and defined per type. An exception is in the case that a type may have a destructor and also inherit the destructor from a base type.