Reputation: 13520
When I use dismiss
to remove a popup window, does it only hide it or removes it from memory?
I tried dismiss
, then showAtLocation
several times (using the same PopupWindw object, not re-creating it) and the window was displayed and hidden without problems. The question is can I count on it - perhaps it is marked for deletion by the GC, but hasn't been garbage-collected yet?
Thanks.
Upvotes: 0
Views: 1530
Reputation: 48272
dismiss()
is opposite to showAtLocation()
, the object remains in a valid state after dismiss()
. So it is safe to toggle dismiss()/showAtLocation()
It can be seen from the Android source code in here - you can look at dismiss()
and showAtLocation()
implementations
Upvotes: 1
Reputation: 137412
An object will not be marked for deletion as long as you have a reference to it. So you can re-show it later.
Upvotes: 1