From 7596e51dbc3b7d65411fbe708c8aafb13ee26701 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 7 Dec 2004 07:13:43 +0000 Subject: [PATCH] fixing memory leak (reported by Ken Thomases) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 4b312d033e..8bcc705707 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1384,12 +1384,12 @@ void wxWindowMac::MacGetContentAreaInset( int &left , int &top , int &right , in if ( m_peer->GetRegion( kControlContentMetaPart , rgn ) == noErr ) { GetRegionBounds( rgn , &content ) ; - DisposeRgn( rgn ) ; } else { m_peer->GetRect( &content ) ; } + DisposeRgn( rgn ) ; Rect structure ; m_peer->GetRect( &structure ) ; #if !TARGET_API_MAC_OSX @@ -1412,12 +1412,12 @@ wxSize wxWindowMac::DoGetSizeFromClientSize( const wxSize & size ) const if ( m_peer->GetRegion( kControlContentMetaPart , rgn ) == noErr ) { GetRegionBounds( rgn , &content ) ; - DisposeRgn( rgn ) ; } else { m_peer->GetRect( &content ) ; } + DisposeRgn( rgn ) ; Rect structure ; m_peer->GetRect( &structure ) ; #if !TARGET_API_MAC_OSX @@ -1444,12 +1444,12 @@ void wxWindowMac::DoGetClientSize(int *x, int *y) const if ( m_peer->GetRegion( kControlContentMetaPart , rgn ) == noErr ) { GetRegionBounds( rgn , &content ) ; - DisposeRgn( rgn ) ; } else { m_peer->GetRect( &content ) ; } + DisposeRgn( rgn ) ; #if !TARGET_API_MAC_OSX Rect structure ; m_peer->GetRect( &structure ) ; -- 2.45.2