Changeset 211579 in webkit
- Timestamp:
- Feb 2, 2017 11:33:09 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r211571 r211579 1 2017-02-02 Brent Fulgham <bfulgham@apple.com> 2 3 Correct memory leak in MediaConstraints 4 https://bugs.webkit.org/show_bug.cgi?id=167744 5 <rdar://problem/30331444> 6 7 Reviewed by Anders Carlsson. 8 9 ConstraintHolder returns a reference to an object created by operator new. When the 10 returned value is assigned or stored in Vector or other containers we leak memory. 11 Instead, this value should just be returned as a regular object so that the return 12 value optimization can make sure memory is properly (and efficiently) used. 13 14 * platform/mediastream/MediaConstraints.h: 15 (WebCore::FlattenedConstraint::ConstraintHolder::create): Return by value. 16 1 17 2017-02-02 Andreas Kling <akling@apple.com> 2 18 -
trunk/Source/WebCore/platform/mediastream/MediaConstraints.h
r209864 r211579 714 714 class ConstraintHolder { 715 715 public: 716 static ConstraintHolder & create(const MediaConstraint& value) { return *newConstraintHolder(value); }716 static ConstraintHolder create(const MediaConstraint& value) { return ConstraintHolder(value); } 717 717 718 718 ~ConstraintHolder()
Note: See TracChangeset
for help on using the changeset viewer.