Local variable lifetime

BlitzMax Forums/BlitzMax Programming/Local variable lifetime

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Ok, That was the only situation I could thing of. Could this be releated to the GDI+ library? GDI+ architecture is not exactly managed code friendly...

I don't know exactly what are you at, but I managed to solve this on C# by creating the variable in the function 'caller' passing it as a parameter, and the same function caller 'frees' the variable inmediatly after the function call. That makes the unmanaged functioning of the variable transparent to managed code (in this case, the module user). I supose OnPain is a sort of event or 'event connector' on wxWidgets, so this could be doable. If I'm wrong, just forget it. :D