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.

DarkBASIC Discussion / DarkBasic eats up my memory!

Author
Message
Chessplayer
22
Years of Service
User Offline
Joined: 22nd Dec 2002
Location:
Posted: 30th Mar 2003 23:27
When I run a lot of DB projects, my RAM really gets eaten away at. Is there any way to restore my system resources?
Chess isn't just for old, wise men! (really!)
CloseToPerfect
22
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 30th Mar 2003 23:55
nope, you have to restart the computer.
It's very important that programmers disable the escape key and create an exit routine to delete all media in their games or other wise you have these memory leaks.
CTP

Angeleyes
22
Years of Service
User Offline
Joined: 17th Mar 2003
Location:
Posted: 31st Mar 2003 00:12
Chessplaer try this routine:

FOR t = 1 to 65535
If object exist(t) then delete object t
If image exist(t) then delete image t
If light exist(t) then delete light t
If matrix exist(t) then delete matrix t
NEXT t
FOR t = 1 to 1024
If sound exist(t) then delete sound t
NEXT t
FOR t = 1 to 31
If bitmap exist(t) then delete bitmap t
NEXT t
FOR t = 2 to 32
If music exist(t) then delete music t
NEXT t
FLUSH VIDEO MEMORY

Ta ta for now
Mary

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 31st Mar 2003 01:36
DB Uses all available memory when it runs. So, my suggestion, is to first run ur other proggys, then run DB.

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy! Oh ya, and Tat has a plugin for that!
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 31st Mar 2003 03:36
um...db automatically deletes everything...u may be running into bugs with db itself, in which case i doubt deleting everything manually would help any... make sure ur copy of db is up to date, ive had no probs with memory leaks with ver 1.13

[center]These are called variables and each one has a little label on it carved in cuneiform script by the hand of an ancient Babylonian black box engineer.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 31st Mar 2003 10:12
hubdule is working on a memory flusher and you are privvy to testing it if u are part of DBDN.

Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 31st Mar 2003 10:22
Jerico2day I'm sorry but apparently db don't delete all things automatically !

Just try a small program that make memblocks and load images
run it some times and you'll get your memory down !

jimbo1913
22
Years of Service
User Offline
Joined: 19th Apr 2003
Location: - Please Select -
Posted: 20th Apr 2003 22:47
Thanks for that AngelEyes. Im new and scanning the forums for some in-sights. That was one.

Newbies (to programming games) CLEAN UP AFTER YOURSELF.

from future review of next game....
'..while the programmer of this game may not be God-like he certainly represents the next step in human evolution. (10/10).'
Red Giant 2183
22
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 21st Apr 2003 01:45
actually , it doesn't use all available memory,
and you should remember for each array you make,load, and images you load to restore the resources as the code below has some serious resource leaks :
dim somearray(200000)
dim anotherarray(230000)
load image "someimage",1
text 3,3,"test"
end

but can be easily modified to release the resources before ending the program by adding these simple lines :
undim somearray(200000)
umdim anotherarray(230000)
delete image 1

RGteam~
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 22nd Apr 2003 07:48
hummm, ive never had probs with it....
I know one should delete what he creates..but it was my impression that db did this automatically...so I never worried about it..figured it would be faster anyways letting db take care of it rather than doing it manually...

*runs off to test it for himself*

The 3D Modeler's Group : http://groups.yahoo.com/group/3dModeler/
The Unofficial DB Newsgroup : http://groups.yahoo.com/group/DBMag/

Login to post a reply

Server time is: 2025-05-18 08:51:23
Your offset time is: 2025-05-18 08:51:23