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.

Are you suppose to be able to reference a Global variable
in a type once the memory for that type has been release and then flushed?

Now I may have misunderstood. But I thought it was Global just for that type.

It looks like it is Global throughout the whole program.

I would think since you could only access the global through the type specifier - then I would think it wouldn't be accessible if that type doesn't exist anymore.

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