[tools] testbot/orm: Let the Collection Items field pop into existence when needed.
Francois Gouget
fgouget at codeweavers.com
Thu May 19 12:14:52 CDT 2022
Collections don't check that it exists so all setting it in the
constructor does is waste memory. Documenting its existence there is
enough.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/lib/ObjectModel/Collection.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index 4e7a032a3..63d470bbc 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -93,7 +93,8 @@ sub new($$$$$;$$@)
MasterKey => ComputeMasterKey($MasterColValues),
# Filter => undef by default
AllScopeItems => $AllScopeItems || {},
- Items => undef};
+ # Items => undef by default
+ };
if ($AllScopeItems)
{
# Avoid memory cycles in case Items have Detailref properties:
@@ -138,7 +139,8 @@ sub Clone($)
MasterKey => $self->{MasterKey},
# Filter => undef by default
AllScopeItems => $self->{AllScopeItems},
- Items => undef};
+ # Items => undef by default
+ };
# See Collection::new()
weaken($Copy->{AllScopeItems});
--
2.30.2
More information about the wine-devel
mailing list