I still say that max's memory mangement is insane.

BlitzMax Forums/BlitzMax Programming/I still say that max's memory mangement is insane.

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.


Type tOne
	Field two:tTwo = New tTwo
End Type

Type tTwo
	Field three:tThree = New tThree
End Type

Type tThree
	Field Parent:tTwo
	Field LotsOfMemeory:Int[500]
End Type


While Not KeyHit (KEY_ESCAPE)

	Local one:tOne = New tOne
	
	one.two.three.Parent = one.two
	
	' uncomment this to see gc working correclty
	' one.two.three.Parent = Null

	Print GCMemAlloced()	
	
Wend 



As far as i can tell this program eats memory untill it crashes. Uncomment one.two.three.Parent = Null so that chains of memory will not be created.

In fact... it crashes in both versions for some reasion.

Perhaps you guys who know your stuff can tell me what im doing wrong.