Overview
Features
Download
Documentation
Community
Add-Ons & Services

destruction of XML objects

Please post support and help requests here.

destruction of XML objects

Postby tnarol » 27 Jun 2007, 18:14

Hi,

Using version 1.2.9 I noticed that XML objects such as Poco.XML.Document and Poco.XML.Element have a protected destructor but don't have a release() method. So I don't know how to destroy objects created as follows :

Poco.XML.NamePool* XmlNamePool = new Poco.XML.NamePool(20000);

Poco.AutoPtr pDocument = new Poco.XML.Document(XmlNamePool);


Debugger shows that destructor of document class is not called.


tnarol
 
Posts: 22
Joined: 21 Mar 2007, 18:56
Location: France

Re: destruction of XML objects

Postby guenter » 28 Jun 2007, 07:38

release is inherited from DOMObject, and the destructor is called just as it should be when using AutoPtr. To verify this, put some debug output into the destructor of DOMObject or AbstraceNode and run the DOMWriter sample.
guenter
 
Posts: 1138
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Re: destruction of XML objects

Postby tnarol » 03 Jul 2007, 16:05

Ok I fixed this problem, it was my mistake ! There were many memory leak issues, that I fixed after realizing that I had to destroy every single element added to the document... I thought they was added to a pool and therefore I needn't destroy them.
tnarol
 
Posts: 22
Joined: 21 Mar 2007, 18:56
Location: France


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron