Inexplicable invalid memory operation when program terminates

H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 5 10:37:23 PDT 2016


On Mon, Sep 05, 2016 at 05:33:17PM +0000, pineapple via Digitalmars-d-learn wrote:
> I have a program which I have stripped down to a single offending line
> which, when present in my program, causes an invalid memory operation
> to occur after main has evaluated:
> 
>     import mach.sdl.window;
>     void main(){
>         auto win = new Window(300, 300);
>     }
> 
> The program is a bit larger than that, but I do not get the error when
> I comment out that instantiation and the things dependent on it.
> 
> I commented out the body of the constructor that is being called, and
> I still get the error.
> 
> Am I missing something or is this an obnoxious bug with the GC?
[...]

What does the destructor do?


T

-- 
"The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts." -- Bertrand Russell. "How come he didn't put 'I think' at the end of it?" -- Anonymous


More information about the Digitalmars-d-learn mailing list