Overview
Features
Download
Documentation
Community
Add-Ons & Services

XML Document collectGarbage

Please post support and help requests here.

XML Document collectGarbage

Postby sgruenwald » 25 Aug 2013, 21:22

Hi!

I try to create some XML document that deletes itself afterwards.
I don't want to held a pointer to each of the elements in the document like in the sample.

So what I like to do is something like:

Code: Select all
AutoPtr<Document> doc = new Document;
doc->appendChild(doc->createElement("test"));

doc->collectGarbage();


How would I do that?
I tried some variants but didn't get the result i would like.
Either it crashes or it just doesn't clean up the memory.

For example I tried
Code: Select all
(doc->appendChild(doc->createElement("test")))->autoRelease();


Could anybody please tell me how to use the collectGarbage feature?
Thanks in advance!

btw: I'm using Poco 1.4.6

br
Stefan
sgruenwald
 
Posts: 1
Joined: 21 Mar 2013, 22:50

Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests