[webkit-reviews] review granted: [Bug 25930] Mismatched free : [Attachment 39353] updated proposed file v3

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 10 10:22:01 PDT 2009


Darin Adler <darin at apple.com> has granted Zoltan Horvath <zoltan at webkit.org>'s
request for review:
Bug 25930: Mismatched free
https://bugs.webkit.org/show_bug.cgi?id=25930

Attachment 39353: updated proposed file v3
https://bugs.webkit.org/attachment.cgi?id=39353&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> -	   // We want to free the memory (which was allocated with new), but we

> +	   // We want to free the memory (which was allocated with fastNew),
but we
>	   // don't want the destructor to run since it will affect the copy
> -	   // we've just made. In theory this is undefined, but operator delete

> -	   // is only defined taking a void*, so in practice it should be ok.
> -	   delete reinterpret_cast<char*>(selectorVector[i]);
> +	   // we've just made. We use fastDeleteSkippingDestructor function,
because
> +	   // that is releasing without destructor call.
> +	   fastDeleteSkippingDestructor(selectorVector[i]);

I think we should leave out the last sentence of the comment here. The name of
the function is clear enough and matches the comment in an obvious way.


More information about the webkit-reviews mailing list