Memory leak when using "text" command

Archives Forums/BlitzPlus Bug Reports/Memory leak when using "text" command

Stoop Solo(Posted 2010) [#1]
I've been tracking down a memory leak in a piece of software I've made in B+, and it seems to be caused by the text command. Eventually, it causes the original program to become sluggish and unresponsive. This will reproduce the issue; if the process is monitored within a process explorer properties window, memory usage will be seen to continually climb.

Global w=CreateWindow("Memory Leak Test",64,64,320,240,0,0)
Global y=CreateCanvas(0,0,320,240,w)
SetGadgetLayout y, 1, 1, 1, 1
SetBuffer CanvasBuffer (y)

Global deffont = LoadFont("Lucida Console",12)
SetFont deffont

Repeat

Cls
Text 160,120,"This will leak memory. (Possibly)",1,1
FlipCanvas (y)

Until KeyHit(1)



This is running on:
- Intel Xeon W3530
- 12GB RAM
- Windows 7 Enterprise 64 Bit
- GeForce GTX 260, DirectX 11.0

I will test this on my ATI/AMP/WinXP laptop when I get home.

*EDIT: See update, WinXP 32 seems OK

Last edited 2010


Stoop Solo(Posted 2010) [#2]
Update: Just tried the example on my laptop, which has an AMD Turion, ATI Mobility 1600, 2GB RAM and Windows XP.

The test did not suffer the memory leak problem. Looks like it might be a Windows 7 64-bit issue, but I have no other Win7 system to test it on.