Patch: fix intermittent crash in KHTML Thai Word Break
Leo Savernik
l.savernik at aon.at
Tue Mar 1 19:09:53 GMT 2005
Am Dienstag, 1. März 2005 18:33 schrieb Koos Vriezen:
> On Tue, Mar 01, 2005 at 06:14:27PM +0100, Leo Savernik wrote:
> > Am Dienstag, 1. März 2005 17:43 schrieb Pattara Kiatisevi:
> > > This is new to me, I thought "delete x" means "free the memory that x
> > > is pointing to and set x to 0", hmm.
> >
> > No, it only means, free *x. C++ doesn't do "convenience" stuff that
> > potentially hurts performance.
>
> I always though that 'delete x' calls the operator delete of X that will
> call the destructor of X, which nicely can clean up what x could have
> left behind.
"delete" calling the destructor is not a convenience, it's a necessity.
Otherwise, there'd be no difference to free().
> Hurts performance badly ..
Depends on the destructor (i. e. on the programmer ;-) ). If you mean
deallocation, that's equally expensive under C.
> Aren't you confusing C++ with C?
Nope. C doesn't do *anything* implicitly.
>
mfg
Leo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20050301/b56dac71/attachment.sig>
More information about the kfm-devel
mailing list