Since I was told type instances are not freed from memory until the end of the program, but saved for later use. However if I create say 100 players, delete the 100 players, and recreate a 100 players the memory is not reused. Is their a better way to do this, I'm still eat 4k(according to task manager) everytime i eat a player, of course thats not much memory but. If I run this It doesn't reuse the memory, but keeps eating it.
;create all players
dim p.player(1000)
for x=1 to 100
p(x)=new player
p(x)\stuff=stuff
next
;delete all players
for pk.player=each player
delete pk
next
;recreate all players
for x=1 to 100
p(x)=new player
p(x)\stuff=stuff
next
If the memorys saved for later use, shouldn't that reuse the memory? I also tried creating each new instance of player at startup, then just changing the status to offline, so no delete, and no new player, however it still loses memory. Is their anything I can do?
;create all players
dim p.player(1000)
for x=1 to 100
p(x)=new player
p(x)\stuff=stuff
next
;delete all players
for pk.player=each player
delete pk
next
;recreate all players
for x=1 to 100
p(x)=new player
p(x)\stuff=stuff
next
If the memorys saved for later use, shouldn't that reuse the memory? I also tried creating each new instance of player at startup, then just changing the status to offline, so no delete, and no new player, however it still loses memory. Is their anything I can do?