summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-04 19:17:50 (UTC)
committer zautrix <zautrix>2005-07-04 19:17:50 (UTC)
commit2710cddd5b0b69efc1c5a7f8516d5b451ff258f1 (patch) (side-by-side diff)
treeabcfa306ccfcdf7aba536cc3f476c0bdbe9ef12b
parent4f3238355f67a256f338986ca13322ef23960895 (diff)
downloadkdepimpi-2710cddd5b0b69efc1c5a7f8516d5b451ff258f1.zip
kdepimpi-2710cddd5b0b69efc1c5a7f8516d5b451ff258f1.tar.gz
kdepimpi-2710cddd5b0b69efc1c5a7f8516d5b451ff258f1.tar.bz2
free ring buffer
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libical/src/libical/icalmemory.c2
-rw-r--r--libkcal/icalformat.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/libical/src/libical/icalmemory.c b/libical/src/libical/icalmemory.c
index 18d7ef9..3ed38ad 100644
--- a/libical/src/libical/icalmemory.c
+++ b/libical/src/libical/icalmemory.c
@@ -64,17 +64,17 @@
#include <stdio.h> /* for printf (debugging) */
#include <stdlib.h> /* for malloc, realloc */
#include <string.h> /* for memset(), strdup */
#ifdef WIN32
#include <windows.h>
#endif
-#define BUFFER_RING_SIZE 50
+#define BUFFER_RING_SIZE 100
#define MIN_BUFFER_SIZE 64
/* HACK. Not threadsafe */
typedef struct {
int pos;
void *ring[BUFFER_RING_SIZE];
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp
index d9fe40b..5877406 100644
--- a/libkcal/icalformat.cpp
+++ b/libkcal/icalformat.cpp
@@ -139,16 +139,17 @@ bool ICalFormat::fromString( Calendar *cal, const QString &text )
setException(new ErrorFormat(ErrorFormat::ParseErrorKcal));
}
success = false;
} else
mLoadedProductId = mImpl->loadedProductId();
}
icalcomponent_free( calendar );
+ icalmemory_free_ring();
return success;
}
Incidence *ICalFormat::fromString( const QString &text )
{
CalendarLocal cal( mTimeZoneId );
fromString(&cal, text);
@@ -220,19 +221,20 @@ QString ICalFormat::toString( Calendar *cal )
if ( text ) {
ret = QString ( text );
}
icalcomponent_free( calendar );
if (!text) {
setException(new ErrorFormat(ErrorFormat::SaveError,
i18n("libical error")));
+ icalmemory_free_ring();
return QString::null;
}
-
+ icalmemory_free_ring();
return ret;
}
QString ICalFormat::toICalString( Incidence *incidence )
{
CalendarLocal cal( mTimeZoneId );
cal.addIncidence( incidence->clone() );
return toString( &cal );