* WebView.cpp:
(getUpdateRects): Use a Vector<unsigned char>, since OwnPtr doesn't
know to call delete[].
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28038
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-11-25 Adam Roben <aroben@apple.com>
+
+ Fix a leak pointed out by Alexey
+
+ * WebView.cpp:
+ (getUpdateRects): Use a Vector<unsigned char>, since OwnPtr doesn't
+ know to call delete[].
+
2007-11-25 Adam Roben <aroben@apple.com>
Fix Bug 16138: Reduce code duplication in WebView.cpp
return;
}
- OwnPtr<unsigned char> buffer(new unsigned char[regionDataSize]);
- RGNDATA* regionData = reinterpret_cast<RGNDATA*>(buffer.get());
+ Vector<unsigned char> buffer(regionDataSize);
+ RGNDATA* regionData = reinterpret_cast<RGNDATA*>(buffer.data());
GetRegionData(region, regionDataSize, regionData);
if (regionData->rdh.nCount > cRectThreshold) {
rects.append(dirtyRect);