How can I create a new object from a pointer?

And I made the change to GENERATED_BODY() in all my plugin classes