TValueListEditor.itemProps is assigning when using the := instead of replacing. lazarus / 31-LCL ---------------------------------------------------------------------- jamie · 2018-01-23 02:40 if you do this..  Create a TItemProp and populate it with all its inners etc.. and then do this..  ValueListEditor.ItemProps := ANewlyCreatedItemProp;  it uses  this.. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TValueListEditor.SetItemProp(const AKeyOrIndex: Variant; AValue: TItemProp);begin  FStrings.GetItemProp(AKeyOrIndex).Assign(AValue);end;               As you can see, it is assigning.. not replacing. There is an Assign that can do this and thus not take claim.  When I create a TitemProp.Create(ValueListEditorInstant) and  use the := , it does work because it simiply assigns the values.  But using HeapTrc, it leads to massive memory leaks. because the ItemProp I made never gets freed apparently there is a ready made ItemProp for each entry in the list which is fine but it would be nice however, if you are assigning the owner to it that it should be getting released! ---------------------------------------------------------------------- taazz · 2018-01-23 03:01 Quote from: jamie on January 23, 2018, 03:40:26 amif you do this..  Create a TItemProp and populate it with all its inners etc.. and then do this..  ValueListEditor.ItemProps := ANewlyCreatedItemProp;  it uses  this.. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TValueListEditor.SetItemProp(const AKeyOrIndex: Variant; AValue: TItemProp);begin  FStrings.GetItemProp(AKeyOrIndex).Assign(AValue);end;               As you can see, it is assigning.. not replacing. That's by design, external data will be copied in internally managed structures. Quote from: jamie on January 23, 2018, 03:40:26 amThere is an Assign that can do this and thus not take claim. Lost me there, there is only one assign usage. Quote from: jamie on January 23, 2018, 03:40:26 am When I create a TitemProp.Create(ValueListEditorInstant) and  use the := , it does work because it simiply assigns the values. after that you need to destroy it too, it is an externaly managed structure the component will not touch it. Quote from: jamie on January 23, 2018, 03:40:26 am But using HeapTrc, it leads to massive memory leaks. because the ItemProp I made never gets freed apparently there is a ready made ItemProp for each entry in the list which is fine but it would be nice however, if you are assigning the owner to it that it should be getting released! 1) Itemprop does not have an owner, ItemProplist is based on a TObjectList which by default will destroy all its objects when it gets freed. My advice, stop create Titemprop and access them directly eg Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ANewlyCreatedItemProp := ValueListEditor.ItemProps[vRow]; after that change its values and move to the row without destroying it. ---------------------------------------------------------------------- jamie · 2018-01-23 03:15 You say it has no owner ?  then why was I able to assign an owner ? also, it required one.. TItemProp.Create Declaration Source position: valedit.pas line 40 public constructor TItemProp.Create(   AOwner: TValueListEditor ); This is from the help file supplied.  if what you say is true, then there is a bug because it requires an owner to create a TitemProp. ---------------------------------------------------------------------- taazz · 2018-01-23 05:57 its badly named, its not an owner in the component sense. It is the container, it is used by its code to access the grid and its editors as needed at runtime. The owner mechanism is introduced in the TComponent.