Settle the pointer ownership issue once for all