Z
ZorpiedoMan
When you create a new object, when is it added to the heap? More
specifically:
Sub go(ClassRef as myClass)
Dim myObj as new myClass = ClassRef
End Sub
does the NEW directive create the reference on the stack and an
empty/initialized instance on the heap, THEN change the reference to the
ClassRef object? Or does it bypass the extra step and immediately just
reference the already existing ClassRef object?
specifically:
Sub go(ClassRef as myClass)
Dim myObj as new myClass = ClassRef
End Sub
does the NEW directive create the reference on the stack and an
empty/initialized instance on the heap, THEN change the reference to the
ClassRef object? Or does it bypass the extra step and immediately just
reference the already existing ClassRef object?