http://redmine.emweb.be/http://redmine.emweb.be/favicon.ico?16934085252011-12-19T08:30:44ZRedmineWt - Support #1106: Manage the memoryhttp://redmine.emweb.be/issues/1106?journal_id=31562011-12-19T08:30:44ZKoen Deforchekoen@emweb.be
<ul></ul><p>Hey,</p>
<p>You indeed need to manage the ownership of widgets / resources correctly.</p>
<p>Widgets are owned by the parent that contains them, and this is usually what you want so you do not need to delete them yourself.</p>
<p>Resources are not owned by the widget that uses them, since they could be shared. But you can parent them also with any WObject. So you could do the following which binds the scope of the file resource to the current widget:</p>
<pre><code> txtFile = new WFileResource("plain/text", "./data.txt", this);
</code></pre>
<p>Regards,<br><br>
koen</p>
Wt - Support #1106: Manage the memoryhttp://redmine.emweb.be/issues/1106?journal_id=31572011-12-20T08:18:06ZArribe Barthelemybarribe@vicomtech.org
<ul></ul><p>Ok, I understand better now.</p>
<p>Thanks a lot.</p>
<p>Bart</p>
Wt - Support #1106: Manage the memoryhttp://redmine.emweb.be/issues/1106?journal_id=31622011-12-22T09:14:03ZKoen Deforchekoen@emweb.be
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul>