|
Post by cygnus on Apr 15, 2018 9:15:20 GMT 1
What I understand is...you're not erasing a() in Proc Test_A(). Could that cause the problem? (I did not load the programm )
|
|
|
Post by scalion on Apr 15, 2018 12:29:10 GMT 1
No, the problem is that : Local dim a() must be erased after endproc, but that's not work ! In fact we always must erase manually tables before return statment, exit proc, exit func, endfunc or endproc. It's a Gfabasic bug contourning.
For example this code will fill all memory after x call :
Proc test
Local Dim A(100000) As long Local Long i For i=1 to 100000 A(i)=Rand(1000) next i
Message "there's data in memory at adress " & v:(A(0))
EndProc
To Correct this problem youmust insert the erase statement before enproc :
Proc test
Local Dim A(100000) As long Local Long i For i=1 to 100000 A(i)=Rand(1000) next i
Message "there's data in memory at adress " & v:(A(0))
Erase A()
EndProc
|
|
|
Post by cygnus on Apr 15, 2018 15:20:10 GMT 1
Oh oh oh...shame to me...I DO this in my own proc to evaluate pressed buttons using the matrix()... Sometimes the wood is not seen of the trees...
|
|
|
Post by cygnus on Apr 15, 2018 22:02:58 GMT 1
Right now I tried this succesful (spalte=column, zeile=row): No need to "Erase matrix()" anymore. Always the GfAWin32.exe uses less than 10MB of Ram
Local Double matrix(0 To spalte, 0 To zeile)
|
|