If I try to allocate memory on line 110 I get a start-up application crash. Application starts but closes just the next moment and I get a "Command terminated" error. I have tried the same class for a smaller application and everything works fine: http://www.pastebay.com/101196
I don't think that this really matters at this point but as you will observe I use FLTK 2 API there.
Thank you for your help!
P.S. My OS is Linux.
P.P.S. I have tried to use Valgrind on my application and it says that I have some memory leaks (definitely). But I am not sure yet how to use Valgrind so here is the log: http://www.pastebay.com/101209
OK! I got it! God, Valgrind is awesome.
First of all a was using xpmImage the wrong way. The right way is just static xpmImage image(xpm_file); . :-)
Second, this->size_range(); and this->show(); on lines 256-257 are wrong. Now I use them in main(), window_main->size_range() and window_main->show().
So, everything works now.