Delayed reference serialisation and reference sharing