Server memory optimization
#7

Neither loops are related to each other. The first loop will keep on looping and will continue to assign NULL data to the variables even after it passed the amount of rows you have because you're not taking the amount of rows in consideration.

The second loop will continue to loop for i < j AND i < MAX_BUILDINGS. You can't exceed MAX_BUILDINGS because I'm sure that your variable to access the enum is a 2D array of which the first set is limited by MAX_BUILDINGS:
PHP код:
new BuildingInfo[MAX_BUILDINGS][...]; 
So allowing your loop to go past this constant will result in array out of bounds errors.
Reply


Messages In This Thread
Server memory optimization - by introzen - 04.04.2016, 15:13
Re: Server memory optimization - by AndySedeyn - 04.04.2016, 15:22
Re: Server memory optimization - by introzen - 04.04.2016, 15:28
Re: Server memory optimization - by Vince - 04.04.2016, 15:33
Re: Server memory optimization - by AndySedeyn - 04.04.2016, 15:37
Re: Server memory optimization - by introzen - 04.04.2016, 15:45
Re: Server memory optimization - by AndySedeyn - 04.04.2016, 15:51
Re: Server memory optimization - by introzen - 04.04.2016, 15:53

Forum Jump:


Users browsing this thread: 2 Guest(s)