Skip to content
Snippets Groups Projects
Commit ce5d8528 authored by catch's avatar catch
Browse files

Issue #3142893 by hchonov, Raunak.singh, kishor_kolekar, alexpott, tstoeckler,...

Issue #3142893 by hchonov, Raunak.singh, kishor_kolekar, alexpott, tstoeckler, catch, kfritsche, johnwebdev: Memory leak - typed data prototypes for field items are not re-used like intended
parent 60c1f976
Branches
Tags
8 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards,!16Draft: Resolve #2081585 "History storage",!13Resolve #2903456
......@@ -169,7 +169,15 @@ public function getPropertyInstance(TypedDataInterface $object, $property_name,
$parts[] = json_encode($settings);
}
// Property path for the requested data object.
$parts[] = $object->getPropertyPath() . '.' . $property_name;
$parts[] = $object->getPropertyPath();
// Only property instances of complex data types should be cached by the
// property name, as they represent different properties. Properties of list
// data types are the items of the list and the property name represents
// only the delta in that list and not an unique property, which is why all
// items should use the same prototype.
if ($object instanceof ComplexDataInterface) {
$parts[] = $property_name;
}
$key = implode(':', $parts);
// Create the prototype if needed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment