unload everything not used automatically

Started by MisterN, November 12, 2012, 08:05:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MisterN

im not saying make it so you cant defy it, but in the next release of bennu, could you create a peice of code that if used, will check for everything not being used and will unload them? Like this:
unload_unused;
do you think you can make something like that work? thanks
werg

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

panreyes

It could be done, but it would be really troublesome, messy and dirty.


It's not worth it, it's better to control your resources.

SplinterGU

BennuGD isn't java... you have pointers a lot of stuff like C... you choose when a resource is unused or no... you can allocated a resource and pass it to a C for that the function in C have control on it... BennuGD can't know that you need or that you do in others modules, or in your prg.

I don't want offend you... but you must be a good programmer instead of ask that bennugd be a good programmer for you...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

MisterN

im just asking cause i have everything constantly unloaded but it appears maps arent unloading off of the ram when i change the level. i want to be able to see everything loaded so i can find what to do to fix it.
werg

handsource-dyko

#5
Is it so much trouble for you to do this manually? You simply need to keep track of the resources. I recommend to make a list of resources on a piece of paper while coding as a reminder. Then, when you do a code review you can look at your checklist to see if you haven't forgotten anything.

Also, this manual resource managment is very flexible and puts you in control. It just requires some more effort and responsibility on the programmers side of things. If everything was automatic in life, it would be very boring. If you drive a car, you need to move the gear lever yourself, unless you want to drive in a boring automatic with no precise control. A manual car makes you feel more connected to the machinery, and an automatic feels very detached. Same thing applies for programming.