Increases the reference count on an object by 1. This method is called internally when a newly created object is claimed by its parent widget and before its floating reference count is sunk, leaving the life of the child completely in the hands of the parent's own reference value.
If you are planning to remove() a child from its parent container, you will therefore need to call ref() on that child first, in order to maintain its life away from the parent.