Global variable inside type exist when discarded.

BlitzMax Forums/BlitzMax Programming/Global variable inside type exist when discarded.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If a type is set to nothing or null, then everything that is associated with it doesn't exist anymore until it is instantiated again.

In VB.Net, when I set c to Nothing, I don't have access to that object anymore because the object doesn't exist. It's Null

        Dim i As Integer
        Dim c As New Class1
        i = c.a
        i = c.b
        c = Nothing
        i = c.a
        i = c.b



Am I confused,ignorant of something or what?
I thought this is what I was doing in BMax.

Type t
	Global a:Int
	Method New()
		a = a + 1
	End Method
End Type


n:t=New t

j:t=New t

Release n
Release j
FlushMem

t.a = 5
Print t.a