Yes, is is becase the stack is popped that the refcount is decremented; after all, the stack is no longer referencing the string. Note that push_string() does _not_ increase the refcount, so you can only use this function when you already have a reference that you wish to "donate" to the stack. If you want to both push the string, and keep your own reference, you need to use ref_push_string.