Just checking
BlitzMax Forums/BlitzMax Beginners Area/Just checking
| ||
In Blitzmax doing something like this:-image = loadimage("arse.png") image = null flushmem() image = loadimage("baps.png") is exactly the same way you do it in other blitz languages like this:- image = loadimage("arse.png") Freeimage image image = loadimage("baps.png") Just hoping this is actually working right. :) |
| ||
You can actually do:image = loadimage("arse.png") image = loadimage("baps.png") and get the same result (with 1.12 onwards). As soon as nothing references the image, it can be picked up by autoflushmem. Although possibly only if you declare image "properly" as image:TImage. |
| ||
you ought to toimage:TImage = loadimage("frontbottom.bmp") |
| ||
And Flushmem is no longer in existance. |
| ||
Just to make things crystal...Local image:TImage = loadimage("baps.bmp") image = loadimage("kebab.bmp")If you really have to... Local image = loadimage("baps.bmp") Release image image = loadimage("kebab.bmp") |
| ||
to be honest I'm more confortable with manual collect (but leaving auto on) so you can free at the best times for your app and have MAx collect anything you miss (because you WILL miss something!). That's why things like Delphi and C++ have special apps you run alongside that spot memory leaks and tell you where to fix the code, they're cool. |
| ||
Yeah I just noticed Flushmem has vanished. |