Git commit 444b23c876efbeedc7de221e97250608377b150a by Khudyakov Alexey. Committed on 17/11/2011 at 21:25. Pushed by khudyakov into branch 'master'. Fix memory leak M +3 -4 kstars/widgets/moonphasecalendarwidget.cpp http://commits.kde.org/kstars/444b23c876efbeedc7de221e97250608377b150a diff --git a/kstars/widgets/moonphasecalendarwidget.cpp b/kstars/widgets/mo= onphasecalendarwidget.cpp index 497c664..1404dc0 100644 --- a/kstars/widgets/moonphasecalendarwidget.cpp +++ b/kstars/widgets/moonphasecalendarwidget.cpp @@ -295,11 +295,10 @@ void MoonPhaseCalendar::paintCell( QPainter *painter,= int row, int col, const KC unsigned short MoonPhaseCalendar::computeMoonPhase( const KStarsDateTime &= date ) { = KSNumbers num( date.djd() ); + KSPlanet earth( KSPlanet::Earth ); + earth->findPosition( &num ); = - KSPlanet *m_Earth =3D new KSPlanet( I18N_NOOP( "Earth" ), QString(), Q= Color( "white" ), 12756.28 /*diameter in km*/ ); - m_Earth->findPosition( &num ); - - m_Moon.findGeocentricPosition( &num, m_Earth ); + m_Moon.findGeocentricPosition( &num, earth ); m_Moon.findPhase(); = return m_Moon.getIPhase();