Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory Leak
#4
Code: (Select All)
SUB MENUMAKER (Elements() AS STRING)
    DIM AS INTEGER StartX, StartY, Count

    FONT LOADFONT("script.ttf", 96)
    StartX = 640 - QPrintWidth(Elements(1)) / 2: StartY = 75: Count = 2
    QPrintString StartX, StartY, Elements(1)
    LINE (640 - QPrintWidth(Elements(1)) / 2, StartY + QFontHeight - 18)-(640 + QPrintWidth(Elements(1)) / 2, StartY + QFontHeight - 22), , BF
    StartY = StartY + QFontHeight + 15
    FONT LOADFONT("script.ttf", 72)
    DO WHILE Elements(Count) <> "*"
        StartX = 640 - QPrintWidth(Elements(Count)) / 2
        QPrintString StartX, StartY, Elements(Count)
        MenuPos(Count).X1 = StartX
        MenuPos(Count).Y1 = StartY
        MenuPos(Count).X2 = StartX + QPrintWidth(Elements(Count))
        MenuPos(Count).Y2 = StartY + QFontHeight
        StartY = StartY + QFontHeight
        Count = Count + 1
    LOOP
    MenuPos(Count).X1 = -1 'Flag for the mouse routinue to stop producing boundary boxes for the checkmark to jump to.
END SUB

Looking at this, guess my eyes didn't even think this could be the issue but reloading the same font over and over is it, perhaps?
Reply


Messages In This Thread
Memory Leak - by NasaCow - 05-10-2023, 02:27 AM
RE: Memory Leak - by TerryRitchie - 05-10-2023, 02:34 AM
RE: Memory Leak - by SMcNeill - 05-10-2023, 03:01 AM
RE: Memory Leak - by NasaCow - 05-10-2023, 04:23 AM
RE: Memory Leak - by SMcNeill - 05-10-2023, 05:13 AM
RE: Memory Leak - by Ikerkaz - 05-10-2023, 11:12 AM
RE: Memory Leak - by bplus - 05-10-2023, 01:27 PM
RE: Memory Leak - by Ikerkaz - 05-10-2023, 02:35 PM
RE: Memory Leak - by bplus - 05-10-2023, 04:55 PM
RE: Memory Leak - by NasaCow - 05-11-2023, 12:25 AM
RE: Memory Leak - by Ikerkaz - 05-11-2023, 02:40 PM
RE: Memory Leak - by SMcNeill - 05-11-2023, 02:48 PM
RE: Memory Leak - by TerryRitchie - 05-11-2023, 03:43 PM



Users browsing this thread: 2 Guest(s)