Last active
March 6, 2017 20:06
-
-
Save MarkGoldberg/66622c33773b265cb7cee05365cd6bc1 to your computer and use it in GitHub Desktop.
Clarion - test of using an interface to call into a derived class from a reference to it's parent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM | |
MAP | |
END | |
include('debuger.inc'),ONCE | |
DBG debuger | |
iGoAway INTERFACE | |
GoAway PROCEDURE | |
END | |
ctRoot CLASS,IMPLEMENTS(iGoAway),TYPE | |
DESTRUCT PROCEDURE() | |
END | |
ctFromRoot CLASS(ctRoot),IMPLEMENTS(iGoAway),TYPE | |
DESTRUCT PROCEDURE() | |
END | |
oFromRoot &ctFromRoot | |
oRoot &ctRoot | |
CODE | |
dbg.mg_init('TestDispose') | |
oFromRoot &= NEW ctFromRoot | |
oRoot &= oFromRoot | |
oRoot.iGoAway.GoAway() | |
!DISPOSE( oRoot ) | |
ctRoot.DESTRUCT PROCEDURE() | |
CODE | |
dbg.DebugOut('ctRoot.Destruct') | |
ctRoot.iGoAway.GoAway PROCEDURE() | |
CODE | |
dbg.Debugout('in ctRoot.iGoAway.GoAway') | |
DISPOSE( SELF ) | |
ctFromRoot.DESTRUCT PROCEDURE() | |
CODE | |
dbg.DebugOut('ctFromRoot.Destruct') | |
ctFromRoot.iGoAway.GoAway PROCEDURE() | |
CODE | |
dbg.Debugout('in ctFromRoot.iGoAway.GoAway') | |
DISPOSE( SELF ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment