[Kde-perl] Memory fault when inserting QTableItem into QTable
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Jul 12 11:20:47 CEST 2004
On Monday 12 July 2004 09:37, Ashley Winters wrote:
> Having a zombie designation is probably useful, but not for silently
> sweeping bogus deletions under the rug. Rather, it should provide a
> diagnostic. It's never okay for Perl to accidentally reschedule an
> object for deletion, since there's no guarantee it's not on the stack
> unless we know we created it ourself, in which case it'd be in the
> object map! Well, there IS a guarantee in this case, but it's safer to
> pretend, lest we discover ourselves in the future scheduling a QEvent
> for deletion.
Well, I'm going off the idea a bit. I tried the same change in QtRuby and it
introduced crashes which didn't use to be there. I think what might have been
happening is that a zombie is still in the object map, while C++ has reused
the address in the heap to allocate an instance of something else. I think
perl ref counting is more deterministic and so the instances might get
garbage collected more promptly and avoid that. But then again they might not
always..
-- Richard
More information about the Kde-perl
mailing list