self = null fails

BlitzMax Forums/BlitzMax Programming/self = null fails

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.

hmm, why can't I do this:

Type TMyType		
	Method Kill()
                'clear some stuff then kill the pointer to this type
		Self = Null
	End Method
End Type 


I guess I'm supposed to either:

a) Make Kill a function that I pass in a pointer to TMyType as a var and then set the pointer to null

OR b) just call test.Kill() and then test = null where test is an instance of TMyType?

Thanks for any help. Maybe I don't even need to worry about it due to GC...