Original Post
Ok here''s the situation. I have a class that I use for my heightmap, although the problem is only with the data representation. So I have a private member:
float* m_pHeightData;
On init I pass the x and z size of the map and create it using either
m_pHeightData = new float[x*z];
or
m_pHeightData = (float*)malloc(sizeof(float) * x * y);
This part works fine, I''ve tried both ways of doing it and it works great. The problem comes at the end of the program, in my shutdown function for the heightmap class it simply goes:
if (m_pHeightData)
{
// either
delete [] m_pHeightData;
// or (dependind on which I used to make it)
free(m_pHeightData);
m_pHeightData = 0;
}
Either way I do this it crashes, I''m using Visual Studio 6.0 on WinXP Pro. The rest of the data is fine, it''s still there and working fine right up to then end. I also made sure to delete the info before program exit by manually calling the Shutdown function. I can''t see any apparent reason for this, I''m just wondering if someone else has encountered similar situations.
-Kudaba (first post in over a year..... I miss you guys)