[Kde-perl] Freeing memory used by QTableItem

Richard Dale Richard_Dale at tipitina.demon.co.uk
Fri Jul 9 05:48:49 CEST 2004


I recently had a similar problem with the qtruby bindings ( which are based on 
the perlqt code), and I solved it be adding 'dispose()' and 'isDisposed()' 
methods. Please find attach a patch for PerlQt 3.008 which adds the same 
methods.

$ cp perlqtdispose.patch PerlQt-3.008/PerlQt
$ cd PerlQt-3.008/PerlQt
$ patch Qt.xs -p0 < perlqtdispose.patch

Then make and install PerlQt..

-- Richard

On Monday 05 July 2004 14:51, Oliver Kreuer wrote:
> Hello,
>
> how can I free memory used by an object of class Qt::TableItem myself?
> I've read that takeItem only removes an item from an existing table
> without destroying the Qt::TableItem object.
> So since I can't simply say "delete <object>" in Perl I tried the
> following:
>
> my @t = ();
> for (my $i=0 ;$i<1000 ;$i++ )
> {
>       $t[$i] = Qt::TableItem(table,&Qt::TableItem::Never,"$i");
> }
>
> sleep(10);
>
> for (my $i=0 ;$i<1000 ;$i++ )
> {
>     $t[$i] = "";
> }
>
> But "top" shows me that memory usage after the last loop increases
> instead of decreases.
>
> Thanks for your help,
> Oliver
>
>
> _______________________________________________
> Kde-perl mailing list
> Kde-perl at kde.org
> https://mail.kde.org/mailman/listinfo/kde-perl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perlqtdispose.patch
Type: text/x-diff
Size: 1230 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-perl/attachments/20040709/1f5d175c/perlqtdispose.bin


More information about the Kde-perl mailing list