It is appreciated if you can open a bugzilla bug report to track this patch,
just to avoid we forget and lose it.
Thanks!
Tinny
----- Original Message -----
From: "Maxim Volkonovsky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 04, 2002 5:35 AM
Subject: final memory cleanup for ICU transcoder
> Hello people,
>
> There is a small piece of code utilizing lazily allocated data clean-up
> appeared in last versions of ICU library. Although it is not a vital
> improvement I hope this helps to fight actual memory leaks.
>
>
> Index: xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp
> diff -c
xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp:1.1
xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp:1.2
> *** xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp:1.1
Mon Mar 18 19:36:58 2002
> --- xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp Mon
Mar 18 23:32:37 2002
> ***************
> *** 74,79 ****
> --- 74,82 ----
> #include <unicode/ucnv_err.h>
> #include <unicode/ustring.h>
> #include <unicode/udata.h>
> + #if (U_ICU_VERSION_MAJOR_NUM >= 2)
> + #include <unicode/uclean.h>
> + #endif
>
>
> #if !defined(XML_OS390) && !defined(XML_AS400) && !defined(XML_HPUX) &&
!defined(XML_PTX)
> ***************
> *** 167,172 ****
> --- 170,184 ----
>
> ICUTransService::~ICUTransService()
> {
> + CleanUp();
> + }
> +
> +
> + void ICUTransService::CleanUp() {
> + #if (U_ICU_VERSION_MAJOR_NUM >= 2)
> + // release all lasily allocated data
> + u_cleanup();
> + #endif
> }
>
>
> Index: xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.hpp
> diff -c
xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.hpp:1.1
xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.hpp:1.2
> *** xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.hpp:1.1
Mon Mar 18 19:36:58 2002
> --- xerces_1_7/src/xercesc/util/Transcoders/ICU/ICUTransService.hpp Mon
Mar 18 23:32:37 2002
> ***************
> *** 116,121 ****
> --- 116,122 ----
> ICUTransService();
> ~ICUTransService();
>
> + static void CleanUp();
>
>
// -----------------------------------------------------------------------
> // Implementation of the virtual transcoding service API
> --- 0 ----
>
>
> Best regards, mailto:[EMAIL PROTECTED]
> Maxim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]