Hey Axel,

Axel Wei� wrote:
Gareth Reakes wrote:

http://blog.parthenoncomputing.com/xerces/archives/2005/05/memory_man
ageme.html

Please give comments. This comes up now and again so its worth
spending a bit of time on to make it understandable.


3) This scheme can give the appearance of memory leaks. If the nodes new anything during their creation or use (for example, Element creates an attribute list in its constructor) then releasing the node will not release that memory.

For me it seems rather inconsistent. What happens to e.g the attribute list after an element has been released? What is it used for? Or, asking differently, should I explicitly release an element's attribute list before releasing the element? Are there, besides attribute lists, any other ressources that are handled similarly?


You could iterate over the attributes and call release on them, but this would not release the memory for the list that was used to store them.

What would speak against just releasing all associated ressources when releasing an element?

We use a memory pool. The memory pool does not have the ability to reuse memory chunks of random size.


(Please, forgive that I have not searched this topic in the list archives, so maybe my questions are stupid duplicates)


No problem. Lets improve the blog entry until it satisfies everyone. I will add your bit in now.

Cheers,

Gareth


PS parthenoncomputing.com now fixed.


--
Gareth Reakes, Managing Director      Parthenon Computing
+44-1865-811184          http://blog.parthcomp.com/xerces

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to