Autor Tema: unload everything not used automatically  (Leído 2738 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado MisterN

  • Hero Member
  • *****
  • Mensajes: 650
  • Karma: 4
    • Ver Perfil
unload everything not used automatically
« en: Noviembre 12, 2012, 12:05:05 pm »
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:
Código: [Seleccionar]
unload_unused;do you think you can make something like that work? thanks
werg

Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re:unload everything not used automatically
« Respuesta #1 en: Noviembre 12, 2012, 12:20:04 pm »
no possible...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Conectado panreyes

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 2042
  • Karma: 64
  • Sexo: Masculino
    • Ver Perfil
    • panreyes.com
Re:unload everything not used automatically
« Respuesta #2 en: Noviembre 12, 2012, 12:28:25 pm »
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.

Conectado SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12517
  • Karma: 369
  • Sexo: Masculino
    • Ver Perfil
Re:unload everything not used automatically
« Respuesta #3 en: Noviembre 12, 2012, 02:33:14 pm »
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

Desconectado MisterN

  • Hero Member
  • *****
  • Mensajes: 650
  • Karma: 4
    • Ver Perfil
Re:unload everything not used automatically
« Respuesta #4 en: Noviembre 12, 2012, 03:29:16 pm »
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

Desconectado handsource-dyko

  • Hero Member
  • *****
  • Mensajes: 568
  • Karma: 32
  • Sexo: Masculino
  • I'm the eye in the sky.
    • Ver Perfil
    • dyko designs
Re:unload everything not used automatically
« Respuesta #5 en: Noviembre 13, 2012, 12:04:21 am »
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.
« última modificación: Noviembre 13, 2012, 01:10:03 am por handsource-dyko »