[Gambas-user] what determines an application's resource useage

Benoit Minisini gambas at ...1...
Thu Apr 24 22:14:55 CEST 2008


On jeudi 24 avril 2008, M0E Lnx wrote:
> This question has been going around in my head for quite a while and
> I'd like to get an answer.
>
> How can I make sure that my application doesn't consume too much of
> the system resources?
> It is my understanding (correct me if I'm wrong) that if I assign a
> variable in an application, the system will allocate a certain ammount
> of RAM to that one variable (Ammount depends on the type of variable
> that is declared)

No, assigning a variable does not use memory at all.

Memory is allocated when:

- A class is loaded.

- A new object is created.

The variables in the stack are allocated at startup.

And of course, the libraries used by Gambas allocates memory on their own.

Regards,

-- 
Benoit Minisini




More information about the User mailing list