Update of /cvsroot/audacity/audacity-src/src/widgets
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv6068/src/widgets

Modified Files:
      Tag: AUDACITY_1_2
        Ruler.cpp 
Log Message:
Fix a couple of memory leaks which can lead to display corruption on Windows.

Index: Ruler.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/Ruler.cpp,v
retrieving revision 1.17.2.7
retrieving revision 1.17.2.8
diff -u -d -r1.17.2.7 -r1.17.2.8
--- Ruler.cpp   2 Oct 2006 11:37:44 -0000       1.17.2.7
+++ Ruler.cpp   7 Nov 2006 02:28:27 -0000       1.17.2.8
@@ -73,6 +73,10 @@
 {
    Invalidate();  // frees up our arrays
 
+   if (mUserBits) {
+      delete[] mUserBits;
+   }
+
    delete mMinorFont;
    delete mMajorFont;
 }
@@ -201,6 +205,7 @@
          mLength = mRight-mLeft;
       else
          mLength = mBottom-mTop;      
+      delete [] mUserBits;
       mUserBits = new int[mLength+1];
       for(i=0; i<=mLength; i++)
          mUserBits[i] = 0;
@@ -643,7 +648,11 @@
        mDC->GetTextExtent(exampleText, &strW, &strH);
      }
      fontSize--;
-     
+
+     if (mMinorFont)
+        delete mMinorFont;
+     if (mMajorFont)
+        delete mMajorFont;
      mMinorFont = new wxFont(fontSize, wxSWISS, wxNORMAL, wxNORMAL);
      mMajorFont = new wxFont(fontSize, wxSWISS, wxNORMAL, wxBOLD);
    }


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to