-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Description
When unmarshalling an object from a pooled instance, the pooling support should be able to use pooled instances all the way down as it grabs and allocates objects. For example if:
message SomeMessage {
SecondMessage header = 1;
repeated OtherMessage items = 2;
}
Even if I pool the outer object, only that level is being serviced from the pool. As it expands the children, these are always new allocations today.
When unmarshalling into a pooled instance, I feel there should be a code path that obtains all instances down the tree (regardless of object depth) from the pools. An additional helper method that returns all instances to the pool would likewise be be valuable. This would enable complex structures to make use of pooling.
Metadata
Metadata
Assignees
Labels
No labels