[30 Aug 2009] memory leak
Posted: Sat Jun 13, 2020 5:32 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 30 Aug 2009 12:29:59 +0200
Hello,
when using the following code the available memory gets reduced heavily and the free memory only knows one direction...
Is there a way to reduce the memoryconsumption?
Hello,
when using the following code the available memory gets reduced heavily and the free memory only knows one direction...
Is there a way to reduce the memoryconsumption?
Code: Select all
Function p_DefMaxPage(total)
maxpage=Int(total/(AreaDim-1))
EndFunction
Function p_pagehandling()
If page >= maxpage
page=maxpage
DisableButton(10)
EnableButton(11)
Undo(#TEXTOBJECT,10)
Else
EnableButton(10)
EndIf
If page = 0
DisableButton(11)
Undo(#TEXTOBJECT,11)
EndIf()
EndFunction
Function p_DisplayNationTab()
CopyBrush(tabbrush,99)
p_DefMaxPage(NationCount)
p_pagehandling()
SelectBrush(99)
SetFontColor(#BLACK)
Local fontsize = GetAttribute(#DISPLAY,0,#ATTRFONTSIZE)
Local y = 0
Locate(0,y)
Print("ID")
Locate(50,y)
Print("Nation")
For i = (page*(AreaDim-1)-page) To ((page+1)*(AreaDim-1))
If (i < NationCount)
y = y + fontsize
Locate(0,y)
Print(t_nation[i][0])
Locate(50,y)
Print(t_nation[i][1])
EndIf()
Next
EndSelect()
DisplayBrush(99,#CENTER,120)
FreeBrush(99)
EndFunction