Hi Jason,
I will take a look at the code tomorrow and see whats happening and
then adjust the blog entry again :)
Gareth
Jason E. Stewart wrote:
------------------------------------------------------------------------
Subject:
Re: Using delete() instead of release()
From:
[EMAIL PROTECTED] (Jason E. Stewart)
Date:
Sat, 28 May 2005 17:17:10 +0530
To:
[email protected]
To:
[email protected]
Gareth Reakes <[EMAIL PROTECTED]> writes:
Hey,
Wrote a short one
http://blog.parthenoncomputing.com/xerces/archives/2005/05/memory_manageme.html
Please give comments. This comes up now and again so its worth
spending a bit of time on to make it understandable.
Hey Gareth,
I've re-examined this. Your blog entry says:
"To release all memory consumed then you must call release on the
document. If, after calling release the document you still see a
memory leak then there may well be a memory leak."
My code does the following:
1) gets a DOMImplementation
2) calls createDocumentType()
3) calls createDocument()
4) calls doc->release()
and it leaks memory. Calling delete on the DOMImplementation is
obviously wrong because the call to getDOMImplementation segfaults
next time around.
I don't have anything else to call release() on, do I?
So I've exhausted my ideas. Why is this not a leak?
Cheers,
jas.
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Gareth Reakes, Managing Director Parthenon Computing
+44-1865-811184 http://www.parthcomp.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]