Wrapping Virtual Destructors

BlitzMax Forums/BlitzMax Programming/Wrapping Virtual Destructors

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.

one thing to try at least would be to wrap it up with a quick validity check.
extern "C" __cdecl void CTVMesh_Destroy(CTVMesh* Ha) {
	if (Ha)
		delete Ha;
}

if that works, then i would look at if its possible that its being called twice. this of course assumes that in your code somewhere after calling this you are setting the handle back to null on the BMAX side.