Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / Undim does not clear the strings

Author
Message
Math89
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 27th Jul 2007 19:26 Edited at: 27th Jul 2007 19:32
I've found this rather annoying bug, when you delete an array (defined as string), the array is deleted, but not the strings.
Just take a look at the task manager (ctrl+alt+del) and you'll see the memory growing. If you don't set any string, the memory doesn't change.



EDIT : It's possible to avoid this bug using the undocumented "free string()" command, but I think, it should be automatically done .
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jul 2007 02:59
It's the same with EMPTY ARRAY too.

This code shows that memory is returned when freed (ie, the VM size decreases back to approx where is was).


This code shows approx the same amount of memory being allocated in an array, and that it isn't freed:


Uncomment the for-loop to show what should happen when un-dimming or emptying an array.

Overdroid
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location:
Posted: 26th Sep 2007 23:32
What about delete array element?

Mr Tank
22
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 12th Mar 2008 14:00 Edited at: 12th Mar 2008 14:01
Wow, this is pretty annoying. I wonder why this happens.

I had wanted to dim and undim strings loaded from a text file for menus, credits etc., but it appears i need to keep them dimmed permanently. Not a huge hardship i guess.

How are strings stored? They can be any length, right? If instead of undimming i just set all of the values to "", do i actually free up useful memory, or will it be all fragmented, and so probably better just to load the sting info once and leave it loaded?

I guess i could make a program to convert text files into byte files of the ascii codes or something, and a bespoke reader, but that might be slightly anally retentive.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC

Login to post a reply

Server time is: 2025-08-08 20:36:40
Your offset time is: 2025-08-08 20:36:40