Debug mode is correct. You forward casted the base class to a type that had not been constructed. I'm really surprised that it doesn't crash in release mode. I'm guessing if you had a bigger application, the memory would get corrupted and you would see a crash at some point.
Generally, I have a pretty specific style. I use almost no functions and I try not to call member variables without using methods. Also, I make my base function abstract so they shouldn't compile.
For example,
As an example...
That said, it looks like it might be worth running an application through debug mode from time to time just to check for things not picked up in release mode.
The problem is that my code is written to catch and throw errors. I seem to remember that max didn't like it when you through an error while in debug mode. I'll have to try it again to refresh my memory.
Thanks
Generally, I have a pretty specific style. I use almost no functions and I try not to call member variables without using methods. Also, I make my base function abstract so they shouldn't compile.
For example,
local pTExtend:TExtend = Null pTExtend = new TExtend pTExtend.Initialize(iNumber) Print pTExtend.GetNumber()
As an example...
That said, it looks like it might be worth running an application through debug mode from time to time just to check for things not picked up in release mode.
The problem is that my code is written to catch and throw errors. I seem to remember that max didn't like it when you through an error while in debug mode. I'll have to try it again to refresh my memory.
Thanks