Notes on graph memory allocation

WX_init() [wxgraph.cc] calls BaseFrame->NewCanvasFrame() [wxmain.cc] to
find or create a graph window to draw into.

MacAnovaBaseFrame::NewCanvasFrame() [wxmain.cc]
 If a particular window is specified (ThisWindow >= 0)
   If the window is in use
      uses MacAnovaCanvasFrame::ResetCanvas() [wxgraph.cc] to delete
	  the existing canvas if non NULL and then create a new canvas using
      MacAnovaCanvas constructor
   else
      it uses MacAnovaCanvasFrame::MacAnovaCanvasFrame() to create and
	  initialize a frame for the slot
   endif
 else
   if there is no free window
      error
   else
      finds the lowest empty frame and then uses
      MacAnovaCanvasFrame:MacAnovaCanvasFrame() to create and initialize
      a frame in the slot
   endif
 endif

MacAnovaCanvasFrame::MacAnovaCanvasFrame() 
  Starts with wxFrame::wxFrame()
  Allocates Picture
  Creates Menu Bar
  Calls MacAnovaCanvasFrame::ResetCanvas() [wxgraph.cc]

MacAnovaCanvasFrame::ResetCanvas() [wxgraph.cc]
 Some member elements are initialized
 if canvas is NULL or was not "just created"
   non-NULL old canvas is deleted, using MacAnovaCanvas::~MacAnovaCanvas()
    and then presumably wxCanvas::~wxCanvas()
   a new canvas is created by MacAnovaCanvas::MacAnovaCanvas()
   If it does not exist, global CanvasFont is initialized
 endif

 array Picture is initialized with header info

QUERY: When a derived object is deleted, are both the destructor for the
  object and the destructor for its parent called?

MacAnovaCanvas::MacAnovaCanvas()
  Creates canvas using wxCanvas()
  Sets up MacAnovaTranslationTable for Ctrl+1, ..., Ctrl+8, Ctrl+F1,...Ctrl+F8
  and other keys
  
  Creates MouseEvent using wxMouseEvent()
  Creates KeyEvent using wxKeyEvent()

MacAnovaCanvas::~MacAnovaCanvas()
  deletes MouseEvent and KeyEvent

  
MacAnovaCanvasFrame::OnMenuCommand() [wxgraph.cc]
  If menu item is MACANOVA_WINDOWS_CLOSE
    calls MacAnovaCanvasFrame::OnClose()
    deletes the associated GRAPHWINDOW element
	deletes Picture (only place Picture is deleted without being replaced)
	deletes this (the MacAnovaCanvasFrame)
	  There is no destructor for a MacAnovaCanvasFrame, so
	  the only destruction is by the wxFrame destructor
      It appears the canvas is not deleted
  endif

wxFrame::~wxFrame() [wx_frame.cpp]
 deletes wx_menu_bar, frameTitle
 any child widgets

MacAnovaCanvasFrame::OnClose() [wxgraph.cc]
   calls BaseFrame->CutCanvasFrame() [wxmain.cc]

MacAnovaBaseFrame::CutCanvasFrame() [wxmain.cc]
  Sets CanvasFrames[frame_index] to NULL and resets menus()
  Deletes nothing

