Page 1 of 1

New isn't calling the constructor

Posted: Fri Mar 30, 2018 11:45 am
by gwoplock
I have been debugging my OS and I have noticed that `new` isn't actually calling the constructor. I found the issue here because the print statement here don't run. My new operator is defined here.

Any help would be appreciated.

Re: New isn't calling the constructor

Posted: Fri Mar 30, 2018 12:28 pm
by Korona
This is not OS dev related but a basic C++ question. New is calling the default constructor and your printf is inside another constructor.

Re: New isn't calling the constructor

Posted: Fri Mar 30, 2018 1:14 pm
by gwoplock
I just noticed that thanks.