Fix memory leak by not duplicating the YGConfig
Summary: YGConfig isn't owned by the YGNode, and thus isn't freed when freeing the node (`YGNodeFreeRecursive`) This fixes a memory leak caused by D6856812 Reviewed By: emilsjolander Differential Revision: D6945022 fbshipit-source-id: 5fd3c3e2ac1cd94d459d5aa06e0daa8f107779ac
This commit is contained in:
committed by
Facebook Github Bot
parent
6e38a26f32
commit
402ee11273
@@ -68,17 +68,12 @@ struct YGCachedMeasurement {
|
||||
if (!std::isnan(computedWidth) || !std::isnan(measurement.computedWidth)) {
|
||||
isEqual = isEqual && computedWidth == measurement.computedWidth;
|
||||
}
|
||||
if (!std::isnan(
|
||||
computedHeight || !std::isnan(measurement.computedHeight))) {
|
||||
if (!std::isnan(computedHeight) ||
|
||||
!std::isnan(measurement.computedHeight)) {
|
||||
isEqual = isEqual && computedHeight == measurement.computedHeight;
|
||||
}
|
||||
|
||||
return availableWidth == measurement.availableWidth &&
|
||||
availableHeight == measurement.availableHeight &&
|
||||
widthMeasureMode == measurement.widthMeasureMode &&
|
||||
heightMeasureMode == measurement.heightMeasureMode &&
|
||||
computedWidth == measurement.computedWidth &&
|
||||
computedHeight == measurement.computedHeight;
|
||||
return isEqual;
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user