const wxString&                   rsTitle
 )
 {
-    wxString                        sTitle;
+    wxString                        sTitle = "";
     const wxChar*                   zPc;
 
+    if (rsTitle.IsEmpty())
+        return sTitle;
     for (zPc = rsTitle.c_str(); *zPc != wxT('\0'); zPc++ )
     {
         if (*zPc == wxT('&') )
     ERRORID                         vError;
     wxString                        sError;
     char                            zMsg[128];
+
 #if wxUSE_ACCEL
     UpdateAccel(pItem);
 #endif // wxUSE_ACCEL
 
 wxMenuBar::~wxMenuBar()
 {
+    //
+    // We should free PM's resources only if PM doesn't do it for us
+    // which happens if we're attached to a frame
+    //
+    if (m_hMenu && !IsAttached())
+    {
+        ::WinDestroyWindow((HMENU)m_hMenu);
+        m_hMenu = (WXHMENU)NULL;
+    }
 } // end of wxMenuBar::~wxMenuBar
 
 // ---------------------------------------------------------------------------