lets say i have a sub in main
and a body delegate class(XUI2D) that has something like this in it
that gets initialised with sub a a couple of times. So sub A gets called x amount of times.
This creates new instances and they all work autonomously and seperate from eachother.
That part works great.
The thing is when the instance becomes obsolete it knows it and need to be destroyed... ended deinitialised or whatever
I dont keep theGauge class variable anywhere (or i would rather not as there is no point)
So can the class instance dinitialize itself when needed from within itself like (me.finish)?
thx for even reading this
B4X:
sub a
Dim theGauge As Gauge
theGauge.Initialize(X2,theBaseName,thePosition,theCoupledId,theCoupledIndex)
end sub
and a body delegate class(XUI2D) that has something like this in it
B4X:
public Sub Initialize (TheX2 As X2Utils,actorName As String,thePos As B2Vec2,theID As Int,theIndex As Int)
x2=TheX2
GaugeBaseName = actorName
thePosition = thePos
coupledID = theID
coupledIndex = theIndex
uniqueId = DateTime.Now
SetupObject(thePos)
End Sub
that gets initialised with sub a a couple of times. So sub A gets called x amount of times.
This creates new instances and they all work autonomously and seperate from eachother.
That part works great.
The thing is when the instance becomes obsolete it knows it and need to be destroyed... ended deinitialised or whatever
I dont keep theGauge class variable anywhere (or i would rather not as there is no point)
So can the class instance dinitialize itself when needed from within itself like (me.finish)?
thx for even reading this
Last edited: