Is there a correct way for handling memory usage and does feenix / flamebird have problems freeing memory.
i have a short program which just changes the backgound image every 50 turns of a counter and after about 5 rotations memory usage on my PC increases by 1mb.
The two images i'm using are 10kb and 744bytes.
my code follows.
when using the graph=x function how do you stop displaying this particular graph.
Thanks
CODE
program bgswap;
global
int g_Bg;
int looptimer;
int choice;
begin
set_mode(320, 240, 16);
looptimer=50;
choice=1;
write_int(0,20,200,0,&looptimer);
While ( !key(_esc) )
looptimer--;
if(looptimer==1 and choice==1)
g_Bg=LOAD_PNG("logo.png");
put_screen(0, g_Bg);
choice=2;
looptimer=50;
end
if(looptimer==1 and choice==2)
g_Bg=LOAD_PNG("background2.png");
put_screen(0, g_Bg);
choice=1;
looptimer=50;
end
frame;
end
end
i have a short program which just changes the backgound image every 50 turns of a counter and after about 5 rotations memory usage on my PC increases by 1mb.
The two images i'm using are 10kb and 744bytes.
my code follows.
when using the graph=x function how do you stop displaying this particular graph.
Thanks
CODE
program bgswap;
global
int g_Bg;
int looptimer;
int choice;
begin
set_mode(320, 240, 16);
looptimer=50;
choice=1;
write_int(0,20,200,0,&looptimer);
While ( !key(_esc) )
looptimer--;
if(looptimer==1 and choice==1)
g_Bg=LOAD_PNG("logo.png");
put_screen(0, g_Bg);
choice=2;
looptimer=50;
end
if(looptimer==1 and choice==2)
g_Bg=LOAD_PNG("background2.png");
put_screen(0, g_Bg);
choice=1;
looptimer=50;
end
frame;
end
end