Yes that is a heap leak. You are creating a button on the heap but never deleting it.
Ptr<T> is used for pointing things, not for memory management.
If you want to create ctrls on the heap, you can use containers: One<Buttorn> or Array<Button>.
They can take care of the ownership and track the object life time.