A leak me in my application and I have come to reduce your code in the following and repetition per 12kb leaks Happening . I do not know if this is a problem with my code or there is a problem with the Xerox library. But seeing private bytes in Perfon, I can not only see development and any shrinkage, so it is clearly leaking.
Can someone please do the following codes may suggest incorrectly that he incredible rate like this (? X & lt; 1000000; x ++) {DataSerializer * ds = new DataSerializer ( );:
(single threaded test app)
for (int x = 0; x & lt; 1000000; x ++) ds- & gt; Test (request); Ds- & gt; Released document (); Ds- & gt; Destroy_xml_lib (); Deleting DS; } Zero Datacirlizer :: Exams (std :: String and Request) {impl = initialize_impl (); } DOMImplementation * DataSerializer :: initialize_impl () {try (boost :: mutex :: scoped_lock init_lock (impl_mtx); XMLPlatformUtils :: Start (); return DOMImplementationRegistry :: getDOMImplementation (XConv ( "core"));} catch (Const Akslksepshn and Kocat) {char * pMsg = XMLString :: transcode (toCatch.getMessage ()); Std :: string msg (pMsg); XMLString :: release (& amp; PMSG);} return null;} void Detasirilaijhr :: Deleted_xml_lib () {boost :: mutex :: scoped_lock terminate_lock (impl_mtx); // MT app is being used in XMLPlatformUtils :: Terminate ();} Zero datacirilizer :: release document () {if (document) {document - & g I do not understand how this might possibly leak? What have I missed?
impl Where is removed? I APIs googling docs I do not know anything else about that, but they suggest me that you can use the Terminate () - in another program, other code, perhaps other threads elsewhere, still use the xerces library. DOMImplementation has been returned as an indicator and is a destroyer - A clear indication that you can manage your lifetime It seems that in fact Chance Story This is your memory leak. Also, that DOMImplementationRegistry :: getDOMImplementation () to NULL
Comments
Post a Comment