K
Klaus Löffelmann
Hello,
I just stumbled over a piece of code, and am not sure, if this is safe.
Suppose, you have a form with a class member, which holds the value for a
certain procedure to return to the calling instance. This procedure should
also close and dispose the form.
In this case, would it be safe to dispose the form before returning the
result?
Me.Dispose() ' close/dispose the Form
Return Items ' item is a form member; is there a chance, that it
is GCed, yet?
End Function
I just stumbled over a piece of code, and am not sure, if this is safe.
Suppose, you have a form with a class member, which holds the value for a
certain procedure to return to the calling instance. This procedure should
also close and dispose the form.
In this case, would it be safe to dispose the form before returning the
result?
Me.Dispose() ' close/dispose the Form
Return Items ' item is a form member; is there a chance, that it
is GCed, yet?
End Function