Search Home Members Contacts
About Us
Bug #733: Bugs with Deleting Objects
TV3D SDK 6.5
Current State:
Created On:
August 2nd, 2007
Last Modified:
August 15th, 2007
Reported By:
This is with the MinGW build although I've seen similar reports from people using the VS C++ build too, so I don't think it's MinGW specific.

I've never had these bugs in any previous version, but in the latest release, I get crashes calling Delete with RenderSurfaces, ParticleSystems and Viewports. I've talked to people having the same problem with cameras too, although I haven't had this issue myself. Since it hasn't affected any objects in previous releases, it's entirely possible that it affects many or all objects, and that I just haven't encountered them yet.

If I use DeleteTVObject in HelperFunctions.h then I do not get the same errors, but I've never had to do this in the past, and I don't know what possible issues might crop up from doing this.

I've posted about it in the forum and received no reply as to what sort of issues it raises, why it's suddenly stopped working as it used to, etc, so I'm posting it here in the hope that something gets done.


Posted by SylvainTV on August 15th, 2007 at 10:51 AM
Well actually, you were lucky when it worked before.
The problem is that here we're mixing two different memory heaps.

TV's Create functions create the objects in the DLL memory heap (msvc c++ one), and calling delete on it on the user side tries to remove it from the EXE heap (MingW c++ one). This gives some conflicts.

So the best thing to do is to use DeleteTVObject really. This way, we're 100% sure it gets deleted in the good place (the DLL)