[Kstars-devel] KDE/kdeedu/kstars/kstars
Prakash Mohan
prak902000 at gmail.com
Tue Jul 28 23:36:18 CEST 2009
SVN commit 1003825 by prakash:
Applying Alexey's patch which fixes a memory leak of the m_Sun and m_Moon objects.
Thanks Alexey!
CCMAIL: kstars-devel at kde.org
M +2 -4 ksalmanac.cpp
M +2 -2 ksalmanac.h
--- trunk/KDE/kdeedu/kstars/kstars/ksalmanac.cpp #1003824:1003825
@@ -42,15 +42,13 @@
geo = ks->geo();
dt.setTime(QTime());
dt = geo->LTtoUT(dt);
- m_Sun = new KSSun;
- m_Moon = new KSMoon;
SunRise=SunSet=MoonRise=MoonSet=0;
update();
}
void KSAlmanac::update() {
- RiseSetTime( m_Sun, &SunRise, &SunSet, &SunRiseT, &SunSetT );
- RiseSetTime( m_Moon, &MoonRise, &MoonSet, &MoonRiseT, &MoonSetT );
+ RiseSetTime( &m_Sun, &SunRise, &SunSet, &SunRiseT, &SunSetT );
+ RiseSetTime( &m_Moon, &MoonRise, &MoonSet, &MoonRiseT, &MoonSetT );
}
void KSAlmanac::RiseSetTime( SkyObject *o, double *riseTime, double *setTime, QTime *RiseTime, QTime *SetTime ) {
--- trunk/KDE/kdeedu/kstars/kstars/ksalmanac.h #1003824:1003825
@@ -85,8 +85,8 @@
void update();
static KSAlmanac *pinstance;
- KSSun *m_Sun;
- KSMoon *m_Moon;
+ KSSun m_Sun;
+ KSMoon m_Moon;
KStars *ks;
KStarsDateTime dt;
More information about the Kstars-devel
mailing list