Article ID: 189156
Article Last Modified on 5/13/2003
-or-
A client application instantiates an object in the ActiveX DLL: the Parent object. The Parent object creates another object in the DLL: the Child object. The Parent object sets a property in the Child object that allows the Child object to have a reference to the Parent object.
Option Explicit
Public Sub gMethod1()
End Sub
Public Function getValidList(a As Object, b() As Collection) As Integer
End Function
Option Explicit
Public objGlobal As UBGlobal.GlobalMethods
Public objParent As Class1
Private Sub Class_Initialize()
Set objGlobal = New UBGlobal.GlobalMethods
objGlobal.gMethod1
End Sub
Private Sub Class_Terminate()
Set objGlobal = Nothing
End Sub
Option Explicit
Private objChild As Class2
Private Sub Class_Initialize()
Set objChild = New Class2
Set objChild.objParent = Me
End Sub
Private Sub Class_Terminate()
Set objChild.objParent = Nothing
Set objChild = Nothing
End Sub
Public Sub CleanUp()
Set objChild.objParent = Nothing
End Sub
Option Explicit
Dim objGlobal As UBGlobal.GlobalMethods
Dim objParent As UBServer.Class1
Private Sub Form_Load()
Set objGlobal = New UBGlobal.GlobalMethods
objGlobal.gMethod1
Set objParent = New UBServer.Class1
End Sub
Private Sub Command1_Click()
' uncomment the following line for solution:
'objParent.CleanUp
Set objParent = Nothing
Set objGlobal = Nothing
Unload Me
End Sub
Additional query words: kbDSupport kbDSD kbVBp kbVBp500bug kbActiveX kbVBp600bug
Keywords: kbbug kbpending KB189156