Allow attach() to take a heap object

This means some methods don't need to access mData.hp directly