Objects
creating an object
Dim myObject As SomeClass ' create a reference pointer to an object Set myObject = New SomeClass ' instantiate the object ' or, do it all in one line, but this is frowned upon: Dim myObject As New SomeClass
destroying an object
- when an object's reference count is at 0, the object is removed from memory; Access will destroy objects if the only variable reference to them goes out of scope
- Set myObject = Nothing
- reduces reference count by 1