Circular References

This code will create a circular reference and these object references will never to destroyed.
This will create a memory leak.

Dim object1 As myClass 
Dim object2 As myClass

Set object1 = New myClass
Set object2 = New myClass

object1.Link = object2
object2.Link = object1

Set object1 = New Nothing
Set object2 = New Nothing

Removing Orphaned Objects

more details

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext