This patch introduces destructors and movers for IMR objects which enables them to own memory. Custom destructors and methods can be defined by specialising appropriate classes.