DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7763>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7763 final memory cleanup for ICU transcoder Summary: final memory cleanup for ICU transcoder Product: Xerces-C++ Version: 1.7.0 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Utilities AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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 ---- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
