wxMax and Multi-Threading

BlitzMax Modules Forums/Brucey's Modules/wxMax and Multi-Threading

It just says:

Unhandled Exception:Unhandled Memory Exception Error

And points to:

wx.mod/base.bmx

at this spot (the arrows indicate the line for the error):

Type wxObject

	Field wxObjectPtr:Byte Ptr

	Function _Free(obj:wxObject)
		' WARNING... we free wxObjectPtr NOW, just in case any of the subclasses have a Free() method, where
		' the probably shouldn't have.
		obj.wxObjectPtr = Null
		
>>>>		obj.Free()
	End Function

	Method Free()
	End Method
	
End Type


Edit to add:

The funny part is, I have a line where I am deleting a file. If I comment out that line, it works, if that line stays in, I get the error. Makes no sense as the file is just a random file on the drive, not having anything to do with the app, and I am not deleting it right before closing (causing a race condition or anything). And I am using the standard Blitz DeleteFile command to delete it.