Advertisement

debug && realese mode

Started by February 01, 2003 06:22 PM
14 comments, last by venomelektro 22 years ago
quote:
Original post by xiros
it looked exactly the same for me in both release and debug.




?

Did you mean all is ok in both cases or wrong in both cases.?
Ok,


I found that the memory is not properly cleared between level 1 and 2

If I put level 2 exit at same place that level 1 exit , I dont have this problem


void CRoom::New_Level( int Level ) {

delete [] sector1.quad;
delete [] sector2.quad;
delete [] sector3.quad;
delete [] obj.quad;


switch (Level) {


case 1:

sector1.quad = new QUAD[400];
sector1.numquads = 400;

sector2.quad = new QUAD[850];
sector2.numquads = 850;

obj.quad = new QUAD[14];
obj.numquads = 14;

sector3.quad = new QUAD[1];
sector3.numquads = 1;

s2ind = 0;
s3 = 0;


break;

case 2:

sector1.quad = new QUAD[400];
sector1.numquads = 400;

sector2.quad = new QUAD[850];
sector2.numquads = 700;

obj.quad = new QUAD[14];
obj.numquads = 14;

sector3.quad = new QUAD[1];
sector3.numquads = 1;

s2ind = 0;
s3 = 0;

break;

default:

break;

}

}



Is someting wrong with this ?
Advertisement
What about this line?

sector2.quad = new QUAD[850];
sector2.numquads = 700;


why numquads = 700 instead of 850?


Also, you might check the location of your .exe file with respect with Debug one. Try executing them in the main directory instead of Debug/Release directories and test both Debug and Release .exe files.


" Do we need us? "


Ionware Productions - Games and Game Tools Development

quote:
Original post by venomelektro
Did you mean all is ok in both cases or wrong in both cases.?


It ran very well both times, except the sky changed after the camera finished moving at the begining. It sort of changed to an almost pure orange instantly when the cam stopped. All the textures were visible, but I did get the same warning as Candy for release but not in debug.
quote:
Original post by HellRiZZer
What about this line?

sector2.quad = new QUAD[850];
sector2.numquads = 700;


why numquads = 700 instead of 850?





Yes it was just a little mistake,


sector2.quad = new QUAD[850];
sector2.numquads = 850;

give the same result



finally fix the problem


There was a matter with some unused variables.

Thanx for replies.

This topic is closed to new replies.

Advertisement