Declares the 'ref$' variable to avoid leaking.