If for example I create a list in the following way:
stringAttributes.ParentObject = list_1;
status = WdfRegistryQueryMultiString(ServiceRegKey, ValueName, &stringAttributes, list_1);
and then put the item in a second list too, the reference count of every wdfstring in the list is 2.
In the the second list e.g. list_2 the items has now the parents of list_1.
How do I correctly free the items from list_2?
Is it correct if I do nothing or must I call wdfCollectionRemove on each item on list_2 to clean up correctly?
What happens if I call WdfObjectDelete(list_2) internally?
I know that I could give the items in list_1 no parent object but it is nice if the list delete the items automatically.
What happens if I call WdfObjectDelete(list_1) before WdfObjectDelete(list_2)?