From d0d7878e0a4cc7871276db37517faf0c61693740 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 27 Mar 2002 11:42:09 +0000 Subject: [PATCH] Patch from Melchior Franz: This module works mostly with char* and allocates memory with strdup ... delete doesn't go well with malloc(). The transition to string only would be nice, but some class interfaces return char*, so it was more natural to just drop the deletes. --- simgear/timing/sg_time.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/timing/sg_time.cxx b/simgear/timing/sg_time.cxx index e87d1947..d2823b77 100644 --- a/simgear/timing/sg_time.cxx +++ b/simgear/timing/sg_time.cxx @@ -136,7 +136,7 @@ SGTime::~SGTime() if ( zonename != NULL ) { char *tmp = zonename; zonename = NULL; - delete tmp; + free(tmp); } } @@ -302,7 +302,7 @@ void SGTime::updateLocal( double lon, double lat, const string& root ) { if ( zonename ) { char *ptr = zonename; zonename = NULL; - delete ptr; + free(ptr); } zonename = strdup( zone.c_str() ); -- 2.39.2