Objects vs. References

From REALbasicWiki

Jump to: navigation, search

In general you do not work with objects directly, rather with references (also called pointers) to objects.

Example:

Dim d As Date

creates a reference to a not yet existing Date object, thus d is Nil.

Dim d As New Date

or

Dim d As Date
d = New Date

creates a Date object somewhere in memory managed by the Runtime system and sets the reference d to the corresponding memory address.

Personal tools
related