When adding shared layers (using shared_layer_id), keep a reference to the wrapper layer, to prevent it from being garbage collected.
When adding shared layers (using shared_layer_id), keep a reference to the wrapper layer, to prevent it from being garbage collected.

In particular, the wrapper layer's lifetime should be at least as long as its child layer's.  (linen uses weak references from child->parent, and we want to ensure that this reference remains valid.)

PiperOrigin-RevId: 483806640

google/praxis,google/praxis