umm, i was under the impression that this should output "destructor was called"?
the reason i ask is that i wanted to call the destructor from another class, so i was kind of hoping that something like this would work :
but no luck with that either, i am sorry if this has been covered before, i've been reading and reading, got a feeling it's got to do with the GC and passing references - but i just don't get it...
i am a OOP newbie, so please bear with me for asking silly questions....
Type Ttest Method New() Print "constructor was called" End Method Method Delete() Print "destructor was called" End Method End Type Local a:Ttest = New Ttest a = Null
the reason i ask is that i wanted to call the destructor from another class, so i was kind of hoping that something like this would work :
Type Ttest Method New() Print "constructor was called" End Method Method Delete() Print "destructor was called" End Method End Type Type Tkill Method killReference:Ttest(tmp:Ttest) tmp = Null End Method End Type Local a:Ttest = New Ttest Local b:Tkill = New Tkill b.killReference(a)
but no luck with that either, i am sorry if this has been covered before, i've been reading and reading, got a feeling it's got to do with the GC and passing references - but i just don't get it...
i am a OOP newbie, so please bear with me for asking silly questions....