jberry 2003/08/26 14:56:30
Modified: c/src/xercesc/util/Transcoders/MacOSUnicodeConverter
MacOSUnicodeConverter.cpp
Log:
Use new MemoryManagerArrayImpl to allocate memory when it must be able to be deleted
via delete [].
Revision Changes Path
1.17 +10 -5
xml-xerces/c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp
Index: MacOSUnicodeConverter.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- MacOSUnicodeConverter.cpp 26 Aug 2003 13:58:49 -0000 1.16
+++ MacOSUnicodeConverter.cpp 26 Aug 2003 21:56:30 -0000 1.17
@@ -98,6 +98,7 @@
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/Janitor.hpp>
#include <xercesc/util/Platforms/MacOS/MacOSPlatformUtils.hpp>
+#include <xercesc/internal/MemoryManagerArrayImpl.hpp>
XERCES_CPP_NAMESPACE_BEGIN
@@ -1005,8 +1006,10 @@
char*
MacOSLCPTranscoder::transcode(const XMLCh* const srcText)
{
- // Transcode using the static memory manaager
- return transcode(srcText, XMLPlatformUtils::fgMemoryManager);
+ // Transcode using a memory manager that allocates
+ // memory using new[].
+ MemoryManagerArrayImpl allocator;
+ return transcode(srcText, &allocator);
}
@@ -1124,8 +1127,10 @@
XMLCh*
MacOSLCPTranscoder::transcode(const char* const srcText)
{
- // Transcode using the static memory manaager
- return transcode(srcText, XMLPlatformUtils::fgMemoryManager);
+ // Transcode using a memory manager that allocates
+ // memory using new[].
+ MemoryManagerArrayImpl allocator;
+ return transcode(srcText, &allocator);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]