1) Variable in Call Procedure are going on Stack
////////////////////////
Where do variables assigned in local procedure to global type reside??
How can one verify this in VB?
[
Code:
Private Sub OnStack
Call AnotherProc(10, "test) << Since Call is part of procedure, Call Parameters are copied to the Stack
End Sub
[
////////////////////////
Where do variables assigned in local procedure to global type reside??
How can one verify this in VB?
[
Code:
Type TOnHeapInfo
i As Integer
s As String
End Type
Public Type TOnHeap As TOnHeapInfo
Private Sub OnHeap
Are locally assiged variables going to Stack or HEAP when the variables are assigned to global Type?
With TOnHeap
.i = 10
.s = "test"
End With
End Sub
[