Local variable lifetime

BlitzMax Forums/BlitzMax Programming/Local variable lifetime

Is this variable pointing something 'outside' the blitzmax code

Yes, which is required not to exist any more at the end of the OnPaint() function.
In C++, this variable would be GC'd away automatically, because it is created on the local "temporary" stack.

I may stick with the "make sure you call Free() when you are done" method, for ease of implementation.