Do not keep around memory references outside of transactions
minor