• Create Account

### #ActualAnubiss

Posted 24 January 2012 - 04:01 PM

But i only have to use free() if i really want to destroy an "object"? So i can create, create and create and only for "n"- 1 (for example) i need to free the memory then?

EDIT:

btw, there´s a new question i have.

//Handelsbildschirm:
/////////////////////////////////////////////////
void handelsbildschirm(void){
while(1){
PA_OutputText(1,0,1,"++++++++++++++++");
PA_OutputText(1,0,2," Station: %02d", stations[istationen].id);
PA_OutputText(1,0,3,"++++++++++++++++");
PA_OutputText(1,2,5,"Handelsbildschirm");
PA_OutputText(1,0,6,"++++++++++++++++");

PA_OutputText(1,0,optionskursor,"o");
}
}

//Stations-Menü:
/////////////////////////////////////////////////

PA_OutputText(1,0,1,"++++++++++++++++");
PA_OutputText(1,0,2," Station: %02d", stations[istationen].id);
PA_OutputText(1,0,3,"++++++++++++++++");
PA_OutputText(1,2,5,"Handelsbildschirm");
PA_OutputText(1,2,6,"Stationsinformationen");
PA_OutputText(1,2,7,"Schiffsinformationen");
PA_OutputText(1,0,optionskursor,"o");
PA_ClearTextBg(1);
switch(optionskursor){

case 5:
handelsbildschirm();

}
}
}

I choose with my cursor the option "Handelsbildschirm" an it leads me to the new menu, but there the cursor does not move. is it because of the "while()" ?

### #1Anubiss

Posted 24 January 2012 - 03:57 PM

But i only have to use free() if i really want to destroy an "object"? So i can create, create and create and only for "n"- 1 (for example) i need to free the memory then?

PARTNERS