summaryrefslogtreecommitdiffstats
path: root/tksao/frame/fitshealpix.C
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-10-04 18:35:13 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-10-04 18:35:13 (GMT)
commitce867b2289e203a85194ecdabb8369bcf4d1dd72 (patch)
treebf26b2d038cc209a0078dd828dd35ef87c001bb2 /tksao/frame/fitshealpix.C
parent308eb4daf4271a1052f67e46c874fdf9cf5bf1e6 (diff)
downloadblt-ce867b2289e203a85194ecdabb8369bcf4d1dd72.zip
blt-ce867b2289e203a85194ecdabb8369bcf4d1dd72.tar.gz
blt-ce867b2289e203a85194ecdabb8369bcf4d1dd72.tar.bz2
track down memory leaks with getString
Diffstat (limited to 'tksao/frame/fitshealpix.C')
-rw-r--r--tksao/frame/fitshealpix.C8
1 files changed, 2 insertions, 6 deletions
diff --git a/tksao/frame/fitshealpix.C b/tksao/frame/fitshealpix.C
index 4d0992b..eb4cb48 100644
--- a/tksao/frame/fitshealpix.C
+++ b/tksao/frame/fitshealpix.C
@@ -25,7 +25,7 @@ void FitsImage::initHPX()
if (fits_->pHPXSystem() >= 0)
coord = (FitsHPX::CoordSys)fits_->pHPXSystem();
else {
- char* str = head->getStringCopy("COORDSYS");
+ char* str = head->getString("COORDSYS");
if (str) {
if (str[0] == 'G')
coord = FitsHPX::GAL;
@@ -35,8 +35,6 @@ void FitsImage::initHPX()
coord = FitsHPX::EQU;
else if (str[0] == 'Q')
coord = FitsHPX::EQU;
-
- delete [] str;
}
}
@@ -45,14 +43,12 @@ void FitsImage::initHPX()
if (fits_->pHPXOrder() >=0)
order = (FitsHPX::Order)fits_->pHPXOrder();
else {
- char* str = head->getStringCopy("ORDERING");
+ char* str = head->getString("ORDERING");
if (str) {
if (str[0] == 'N')
order = FitsHPX::NESTED;
else if (str[0] == 'R')
order = FitsHPX::RING;
-
- delete [] str;
}
}