Obviously doing this:
works but leaks
DynamicObject::Ptr dyna = new DynamicObject(); var(dyna.getObject());
Also works with no leaks but looks complicated
Is there any better suggestion ?