cSingletonWrapper




Option Explicit
'

' Instancing 5 - multiuse

'

' Uses the BAS module to count how many references there are to the

' one and only Singleton class as defined below

'


Private m_Singleton As Singleton

Private Sub Class_Initialize()
Set m_Singleton = SingletonMod.GetReference
End Sub

Private Sub Class_Terminate()
SingletonMod.ReleaseRef
End Sub

' the rest of public methods/properties the class supports

' delegating the implementation to the singleton class...

Public Sub SomeSub()
m_Singleton.SomeSub
End Sub










( csingletonwrapper.html )- by Paolo Puglisi - Modifica del 17/12/2023