Memory leaks

View: New views
5 Messages — Rating Filter:   Alert me  

Memory leaks

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Just so you know, v5.0b3 has many memory leaks, so you can expect  
memory usage to increase over time. I am in the process of plugging  
those leaks, I hope to have a new version out later today.

Kind regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: Memory leaks

by Oliver Brodwolf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Aparajita

I found out, that every time there is a process-variable in the game  
(if a reference to a collection, or not, it makes memory problems). I  
eliminated a lot of them in my application, and this helps.
But now I have to do a lot of
global($myPseudoProcessVar) in most methods.

I know, the other solution would be to use the  _request collection.

Isn't it possible, to declare a view variables as global in a special  
way (in On Execute Start)  , so that in any method this variables are  
global without declare it in the method.

method "On Execute Start"

        global($myPseudoProcessVar ; modeAnywhere)

end method


method "test"

        write($myPseudoProcessVar)

end method


Regards, Oliver

Am 12.10.2009 um 16:14 schrieb Aparajita Fishman:

> Hi,
>
> Just so you know, v5.0b3 has many memory leaks, so you can expect  
> memory usage to increase over time. I am in the process of plugging  
> those leaks, I hope to have a new version out later today.
>
> Kind regards,
>
>   Aparajita
>   www.aparajitaworld.com
>
>   "If you dare to fail, you are bound to succeed."
>   - Sri Chinmoy   |   www.srichinmoy.org
>
> _______________________________________________
> Active4D-dev mailing list
> Active4D-dev@...
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: Memory leaks

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I found out, that every time there is a process-variable in the game  
> (if a reference to a collection, or not, it makes memory problems).  
> I eliminated a lot of them in my application, and this helps.

I will eliminate this leak, but in general you shouldn't use process  
variables as globals.


> But now I have to do a lot of
> global($myPseudoProcessVar) in most methods.

If you only want the variable to be global to the current request,  
this is not correct. The globals collection is global to every  
process. It's the equivalent to interprocess variables in 4D.


> I know, the other solution would be to use the  _request collection.

I think this is the correct solution.


> Isn't it possible, to declare a view variables as global in a  
> special way (in On Execute Start)  , so that in any method this  
> variables are global without declare it in the method.

The simplest solution would be to allow you to use global() in the  
global scope, which would make the variables global to the entire  
request. I'll have to see if this is possible. In the meantime please  
use _request.

Kind regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: Memory leaks

by Oliver Brodwolf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Am 12.10.2009 um 17:11 schrieb Aparajita Fishman:

>> I found out, that every time there is a process-variable in the  
>> game (if a reference to a collection, or not, it makes memory  
>> problems). I eliminated a lot of them in my application, and this  
>> helps.
>
> I will eliminate this leak, but in general you shouldn't use process  
> variables as globals.
>
>
>> But now I have to do a lot of
>> global($myPseudoProcessVar) in most methods.
>
> If you only want the variable to be global to the current request,  
> this is not correct. The globals collection is global to every  
> process. It's the equivalent to interprocess variables in 4D.
Why is this not correct?
Manual Page 219:
global(localVar {; localVarN} | *)
Parameter Type Description
localVar | * Local Variable | * → Local variable to bring into  
current scope, or all locals

>
>
>> I know, the other solution would be to use the  _request collection.
>
> I think this is the correct solution.
>
>
>> Isn't it possible, to declare a view variables as global in a  
>> special way (in On Execute Start)  , so that in any method this  
>> variables are global without declare it in the method.
>
> The simplest solution would be to allow you to use global() in the  
> global scope, which would make the variables global to the entire  
> request. I'll have to see if this is possible. In the meantime  
> please use _request.
>
> Kind regards,
>
>   Aparajita
_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Re: Memory leaks

by aparajita :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>> But now I have to do a lot of
>>> global($myPseudoProcessVar) in most methods.
>>
>> If you only want the variable to be global to the current request,  
>> this is not correct. The globals collection is global to every  
>> process. It's the equivalent to interprocess variables in 4D.
> Why is this not correct?
> Manual Page 219:
> global(localVar {; localVarN} | *)

Currently with the global keyword you have to declare the variables  
global in every method that use them. It sounded to me like you want  
to declare a variable to be global only once in the global scope.

Kind regards,

    Aparajita
    www.aparajitaworld.com

    "If you dare to fail, you are bound to succeed."
    - Sri Chinmoy   |   www.srichinmoy.org

_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/