First time here? Check out the FAQ!
answered Sep 13 '12
Yes you can do this. Mat automatically manages memory via a reference-counting mechanism.