After October 2019 updates, it seems that the class termination has changed behavior, when you call an class inside an other class
<%Class myClassPrivate Sub Class_Initialize()Response.Write "myClass Initialized<br>"End SubPrivate Sub Class_Terminate()Response.Write "myClass Terminated<br>"End Sub
Public Function TestFnc()TestFnc = "1<br>"End FunctionEnd Class
Class myOtherClassPrivate Sub Class_Initialize()Response.Write "myOtherClass Initialized<br>"End SubPrivate Sub Class_Terminate()Response.Write "myOtherClass Terminated<br>"End SubSub MainSub()Dim myClassObj Set myClassObj = New myClassResponse.Write myClassObj.TestFncSet myClassObj = NothingResponse.Write "2<br>"Set myClassObj = New myClassResponse.Write myClassObj.TestFncSet myClassObj = NothingResponse.Write "3<br>"End SubEnd Class
Dim myObjSet myObj = New myOtherClassCall myObj.MainSubSet myObj = Nothing%>
Before the update the result is:myOtherClass InitializedmyClass Initialized1myClass Terminated2myClass Initialized1myClass Terminated3myOtherClass Terminated
After October update:myOtherClass InitializedmyClass Initialized12myClass Initialized13myClass TerminatedmyClass TerminatedmyOtherClass Terminated
As you can see, the termination of myClass happens with the termination of the myOtherClass.
I think that is a serious Microsoft bug.
Domus71
P.S. I think that the KB4520724 Servicing Stack Update causes this strange behavior.