Memory leak...?

BlitzMax Forums/MaxGUI Module/Memory leak...?

SLotman(Posted 2013) [#1]
I had a small program I've made to list all fonts on windows, and then display them on a list box. Worked pretty well, until I tried it on Windows 8.

Now the same program crashes, with an "unhandled memory exception" thing while I'm adding the fonts to the listbox. Running the program with "XP compatibility" fixes it though.

This is the code:



Can anyone help me out on this? I have no idea what's wrong, or how to fix it :(


SLotman(Posted 2013) [#2]
Hmmm... strange. I just changed the order on how the controls were build (adding everything to the list in the end of my function) and now it works.


jsp(Posted 2013) [#3]
You could check out via the debugger which line gives the error inside AddGadgetItem function.
Unfortunately I have no Win8 at hand to test.

SelectGadgetItem lstFonts,0

Better not to select an Item if you don't know if there is at least one to select. Could give another exception.