Actually, what I am doing right now is, I created a callback to self made 
"Quit" button for closing the software. The callback contains all de-allocation 
of pointers those I am using during runtime.

So, I am little bit less sure about this, is it a right way of de-allocation of 
all pointers? What if the user click on the main FLTK window close button (top 
right corner of the window)?

Means can we call the destructor of the main window and put everything in that 
destructor which we want to de-allocate at the end of the session ?


void quit_cb(Fl_Widget*, void*)
{
        printf("%s \n", "Closing.");
        ResetPointers();
        nb_Vertices = 0; nb_Faces = 0;
        ResetVerticesNormalsMemory();
}


In this image you can find the Quit button for closing the software. I 
deallocate everything from there. Can I deallocate using the main close button ?

http://real3d.pk/images/albums/3d_renderer_and_cutting_simulator.jpg
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to