Angus Leeming <[EMAIL PROTECTED]> writes:

| The LyXView is controlled by LyXGUI. It
| makes a new LyXView, but never deletes it. 
| 
| Can you modify LyXGUI::~LyXGUI()?
| LyXGUI::~LyXGUI()
| {
|       ...
|       if( lyxViews ) delete lyxViews;
| }

and should be changed to
        delete lyxViews; // not need to check for 0 pointer

| 
| The constructor should be modified too:
| 
| LyXGUI::LyXGUI(LyX * owner, int * argc, char * argv[], bool GUI)
|       : _owner(owner), lyxViews(0)
| {                                     ^^^^^^^^^^
|       ...
| }
| 
| This of course is aside from the fact that LyXGUI contains
| a publiclly accessible pointer to the LyXView. Am I
| allowed to say "Ughhh!"? What's wrong with:
| 
| class LyXGUI {
| public:
|       LyXView const & lyxview() const { return *lyxViews; }
| private:
|       LyXView *lyxViews;
| }
| 
| Shall I make a patch for this?

go ahead. look out for unforseen sideeffects.
Note also that lyxViews from the beginning was intended to be a list
of LyXViews not just one. when is lyxgui->lyxViews used?

        Lgb

Reply via email to