Change font size / Maintain screen size.
#12
Note that the following does *NOT* cause a memory leak:

Code: (Select All)
Dim f(-1 To 0) As Long
f(-1) = _LoadFont("lucon.ttf", 32, "monospace")
f(0) = _LoadFont("lucon.ttf", 34, "monospace")
Screen _NewImage(640, 480, 32)


Do
    f = Not f
    _Font f(f)
    Print "Hello World, I'm looking for a memory leak!"
Loop Until _KeyHit

This must be some glitch which occurs in SCREEN 0 from the resize routine and how font is interacting with it. In 32-bit screens, there's no leak with memory with the above code.
Reply


Messages In This Thread
RE: Change font size / Maintain screen size. - by SMcNeill - 11-12-2022, 01:00 AM



Users browsing this thread: 3 Guest(s)